Kraft Heinz booked higher third-quarter profits as aggressive cost cutting continued to offset lower sales.