Trump’s mind was changed by a furious last-ditch lobbying campaign from the Canadian government, Republican lawmakers, business groups and the United Steelworkers.