Heinz has reported higher first-quarter earnings, as cost reduction efforts more than offset a slowdown in sales.