Also precalculate sort functions.  Despite the internal cache in getSortFn(), the shear number of calls to getSortFn causes older browsers (IE8) to have significant overhead.