Justin Trudeau, once celebrated as a progressive leader, now leaves office with a tarnished legacy, facing internal party turmoil and widespread public dissatisfaction.