The German government has reached an agreement with the European Union to allow the sale of vehicles that burn fuels made from renewable energy past 2035, resolving a dispute that threatened to upset a key element of the bloc’s path to climate neutrality.