New Zealand's Fonterra, the world's largest dairy exporter, is to carry out a major review of its business after recording its first ever loss.