The hundreds of billions of pounds of waste produced by America’s dairy cows every year has long been a headache for farmers.