Danone, the French food giant, has finalised a deal to invest in an infant-formula business in New Zealand.