The police said that the man had displayed a firearm. The shooting caused a partial shutdown of Canada’s busiest airport.