OTTAWA—Just months ago, the outcome of Canada’s 45th general election campaign seemed cushioned in certainty. But before it even started, the return of a U.S. president and the departure of a ...