table column sorting: fixed for dataset list, added for statistics.

Fixes issue #716 and #604  numeric table sorting for datasets list and adds table sorting to statistics table