The move by Canadian Prime Minister Justin Trudeau is a fresh sign of how inflation and other economic headwinds have hammered incumbent parties around the world in the past 12 months.