cache sort cells to improve performance and make compatible with floatThead

The sort cells do not change, so they can be cached. This also makes your script compatible with floatThead: https://github.com/mkoryak/floatThead

I am trying to compile a list of good table plugins that are compatible with the script, and would like to include this one on that list.