Artificial intelligence allows farmers to increase yields by spotting pests and diseases early — and has led to a new wave of indoor growing startups.