The opposition leader of Canada’s most populous province resigned in the wake of sexual misconduct allegations, throwing his party into chaos just five months ahead of a provincial election.