TSA employees should indeed be professional, polite, kind, helpful - a lot of the stuff described by kmersh above. But like any public-facing government employee with any authority (in this case, the authority to touch your property, your person and to allow - or not - you entry to the "secure" side of the airport) there should also be some professional detachment. Smile, sure. Be cheerful, okay. But keep the small talk to a minimum and stop it when the passenger doesn't "play along." And stop the jokes completely.
They are not there to be our friends. They are there to carry out (what some believe is) an essential screening function. They are there because of the (infinitesimal) chance that one of us is a criminal.
We are not there to be their friends. We are there because we want to go somewhere on an airplane. We are there because we have to go through the checkpoint because of the (infinitesimal) chance that one of us is a criminal.
I make small talk with my friends. I'll make small talk with a stranger at the boarding gate or the lounge or the bus stop, because we share the common ground of fellow travellers, and because either of us can walk away if we don't feel like continuing.
I make jokes with my friends. If they tease me I can tease them back. We know each others' weak spots and we don't get mean. If my friends don't think my joke is funny, they change the topic; they don't rummage through my handbag and then tell me I can't fly today. My friends don't post signs saying "no jokes allowed" and then make jokes about me.
Before you say TSA should be "light-hearted", go back and read the specific examples in the original post. Here's my score:
1) Based on mistake about the passenger's t-shirt logo, the TSA employee attempts to find common ground with passenger over a video game. Not actually offensive, just unnecessary. Dude, he's going to be gone in a minute and you'll never see him again - you don't need to bond.
2) "Joking" about not allowing an object. Blatant and cruel abuse of authority, hiding behind "just kidding." Wrong wrong wrong.
3) The fact that he knew a bunch of languages is cool. Having someone available to help with translation when needed is cool. The fact that TSA pays someone to "walk up and down the line rattling out instructions" is not cool. A simple signboard using pictures is cheaper and more effective. (Visit absolutely any international airport outside the USA for examples). The fact that he was "trying to determine" people's nationalities could be an attempt to be helpful or it could be BDO profiling or it could be just showing off. There's no obligation to discuss one's nationality with TSA, and some people may not want to reveal personal information in front of a group of strangers.
4) As with (1), not offensive just unnecessary. The passengers are not there to help you deal with your loneliness or homesickness. Stifle the need to make small talk.