Volkswagen has reached an agreement with a workers' union at its Puebla plant in Mexico to end a strike that began last week.