Former central banker Mark Carney has won the race to become leader of Canada's ruling Liberal Party and will succeed Justin Trudeau as prime minister.