Justin Trudeau has resigned as the leader of the Liberal Party after nearly a decade of serving as Canada’s prime minister.