refs #246: Fix using a function for sorting and ensure update on updateS...

This pull request references issue #246. It fixes a problem with initialisation of the sort function in stSort and moves the isFunction check to the table controller.