Change JSON API sorting criteria

Criteria from priotiry changed to id
* Use redis SORT instead of ZRANGE
* Remove sorting in map function

Currently, the web ui still not work correctly when it comes newer jobs. I will make another patch for that.