TSA needs a lot of fixing. But on the whole I think nationalised airline security is probably the right way to go.
1) Reinforced cockpit doors and armed pilots so terrorists can't get control over the plane.
2) Better intelligence and policing on the ground; remember, in the last attempted attack the guys father had raised concerns about him beforehand.
Airport screening is basically security theater.
If you'd arm anyone at all, you'd want to be sure they are very well trained (e.g. a police officer, infantryman or equivalent) and in a better position to help.
I doubt they would just issue a firearm along with the uniforms. Many airline pilots are ex-military and quite capable of using a sidearm. Training/restrictions would certainly be available for those that aren't.
You can say, "well, only if there's a hijacking" and I'll say, "but how could they be 100% sure, and what would insurance companies make them do to be sure before allowing them to potentially kill innocent passengers, with that insurance company liable?"