Postgres leaderboard sort fix

* Make leaderboard feature test sort order
* Move data access from the view to the controller
* Fix the sort order by putting `NULLS LAST`
* Remove ".0" from leaderboard numbers by explicitly casting to `::integer` in the leaderboard query