Canada is expanding trade and security ties beyond the US as tensions with Washington reshape its foreign policy strategy.