Official says Canadian Prime Minister Trudeau set to resign as Liberal Party leader, effectively ending time in power.