Flexible client-side table sorting