US baker Flowers Foods saw its earnings and sales climb in the first half, boosted by gains from recent acquisitions.