Rafael Devers agrees to massive Red Sox contract extension