Mark Carney is set to be elected as prime minister of Canada after his ruling Liberal Party were projected to win the election.