A pay dispute that has rocked Heinz's flagship UK production site for three months has ended after staff accepted the latest offer from the baked beans maker.