Re-add sorting to pull-requests-per-repo graph

Prior to this commit, I had removed the sorting-by-pull-request-count
feature from the pull-requests-per-repo graph because (as documented in
an earlier commit), that made the bars needle thin for some reason. I
contacted the developer for dc.js, and he had no idea why the frak that
was happening, but he showed me how to force the bars to be the width I
wanted. So this commit re-adds the sort feature.
Abstracts how spec tests generate test data

Prior to this commit, spec tests generated test database records in an
ad hoc fashion. This commit adds to `spec_helper.rb` some hashes with
default field values for one repository record and one pull request record
that belongs to it. Spec tests that need to have test data in the database
can easily create a pull request and repository record using those
hashes.
Add spec tests for web_app.rb

Prior to this commit, there were no spec tests for `web_app.rb`. This
commit adds some (very simple) tests for each of the Sinatra routes.
These tests check 1) that the page can be be reached, 2) where relevant,
some routes return `Not Found` when passed an invalid module name, and
3) where relevant, the route returns a JSON string. More tests to come.
Test that web_app routes return right type of JSON
Add tests to JSON routes for web_app

Prior to this commit, there were tests in `web_app_spec.rb` that checked
that the routes that return JSON  did in fact return JSON, and that they
returned either an array or a hash (as applicable). This commit adds
more detailed tests, which check that the routes return hash(es) with
the right keys.