New gadgets are helping farmers manage their herds and maintain the quality of their milk