Store separate sort context for each table

This simple change moves the `bsSort` and `lastSort` variables into a per-table context object. This ensures that each table on the page will have its own context. It prevents the `bsSort` data from one table from colliding with the `bsSort` data of another table, which causes odd behavior.

This should fix the problems mentioned in #46.