Consolidate leaderboard into mahoosive query

* Bunch of joined subqueries
* About 1/2s. Still not great but doesn't time out
* Really tiny amount of Rails integration
* leaderboard/index.html.erb loses some looping