MillerCoors has agreed a deal with union workers in Milwaukee after the threat of strike action over pay and benefits.