Volkswagen has agreed to pay up to $17.5 billion in the U.S. to settle claims with regulators, consumers, dealers and state attorneys general and could face another multibillion-dollar penalty in the expected criminal case.