Prototype a basic departmental leaderboard

- This is so that users of the transition tool can see who has the most
  mappings, the most unresolved mappings and the most errors.
- These queries are messy raw SQL and the page times out on first load.
Use SQL's INNER JOIN instead of listing multiple tables in the FROM

- Thanks to Russell for the tutorial. :-)
Use number_with_delimiter to pretty-print the numbers
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
Add a link to the organisation's page from each row of the leaderboard
Order the table by error count with biggest offenders first

- Add a down arrow to the errors column header so that users know what
  the data is being filtered on.
Add a title and a description to the leaderboard page

- This needs some copy work, probably.
Add a Cucumber feature to check that the leaderboard page displays

- Only for GDS Editors at the moment - do we want to open this up to
  everyone?
Use a Bootstrap-styled down arrow instead of the HTML entity
Only count errors occurring in the last thirty days

- Do this in SQL, no client-side config for the user to choose their
  date range.
Get rid of a deprecation warning on the leaderboard scope, since Rails 4
Add a comment to the huge leaderboard scope, and some RSpec tests for it

- Paired with Jamie on this.
Decrease the number of INSERT queries with `testing_before_all: true`
Merge pull request #357 from alphagov/spike_prototype_department_leaderboard

Departmental leaderboard