Canada’s largest oil refinery will remain locally owned, perhaps because of Donald Trump’s tariff threat.