Farmers' use of artificial intelligence is surging as they seek high-tech help to plan and manage operations after years of belt-tightening, according to McKinsey & Company.