Checks whether queryParams.order is a function or string in the fix of sorting parameters

When the order queryParam parameter was a function the fix produced
incorrect query parameters.
Fix code style
Adds test case for queryParams.order as a function
Merge pull request #227 from pekala/master

Fix for queryParams.order being a function
Fix #232. Deleting the last element of the last page will now reset the current page to the previous page
Version 2.0.1