Eduardo Vargas and Alexis Sanchez scored twice as Chile qualified for the quarter-finals of the Copa America Centenario.