[STORM-808] Fix resource response sorting using ?sort query param.
Merge pull request #790 from StackStorm/STORM-808/entity_sort_fix

[STORM-808] Fix resource response sorting using ?sort query param.