Canada's Liberal leader Justin Trudeau, son of a popular former prime minister, won the general election in a landslide that ended nine years of Stephen Harper's Tory rule.