A dairy firm is promising to make its farms carbon-neutral by 2050 in a move described as “ambitious”.