Congress agrees on funding for farmers, hunger relief in spending bill to avert shutdown