Canadian Prime Minister Justin Trudeau has announced his resignation.