New Zealand dairy giant Fonterra has sold its 50% share in a joint-venture company to a fund managed by UK private-equity firm CVC Capital Partners.