The 53-year-old scion of one of Canada’s most famous prime ministers became deeply unpopular with voters in recent years.