When the Canadian prime minister burst onto the scene in 2015, his liberal bona fides made him an instant political star.