Canadian Prime Minister Justin Trudeau has announced his resignation as the head of the Liberal Party of Canada.