Postgres leaderboard sort fix

* Make leaderboard feature test something other than the presence of a header
* 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