Air quality in Canada’s largest city was at times the worst in the world as wildfires across Ontario sent smoke drifting into New York City and beyond.