General Mills has agreed to buy Brazilian food manufacturer Yoki Alimentos, three months after speculation emerged that a deal had been signed.