Canadian Prime Minister Justin Trudeau has announced his resignation as Liberal Party leader.