The German automaker Volkswagen has agreed to pay almost 15 billion dollars to US consumers to settle complaints it cheated on diesel emissions tests.