Mark Carney, the former governor of the Bank of England, will take office as Canada's next prime minister amid a trade war with the US.