The literal meaning of 客气 would seem to be something like "air guest." How did that transform into "polite"? And is there a resource I can turn to to find out such things?
客 - guest
氣 - air. spirit ...
客氣 - in the spirit of a guest
When you're a guest in someone's house, you behave like a guest should, that is, be polite.
When you're a guest, your host might say “不要客氣” （don't behave like a guest). This is not to say you shouldn't be polite. It is rather their way of saying "make yourself at home".
Another way to translate 不要客氣 is "don't stand on ceremony". 客氣 encompasses both of these ideas - politeness and formality. Both are positive attributes, but too much of either tends to create distance. Being the right degree of 客氣 is truly an art.