Split the webapi unit tests into per-resource test files.

The webapi unit test suite was getting far too large to maintain. This
splits it out into a bunch of files, one per resource test class. Not
only does that help organization, but it also helps when wanting to run
a specific test suite.

This change does introduce a regression where, due to files importing
classes from other test files, many suites execute more than once. That
will be fixed in a subsequent change that further organizes information
around the tests.
Centralize webapi tests' mimetypes and URL lookups.

The work to split up the webapi test suite had an issue where unit test
classes were being executed multiple times in a test suite run. This
happened because test*.py files were importing classes from other
test*.py files, and nose was finding them. These needed to be imported
in order to get the mimetypes and URLs from those test classes.

This change solves this problem by introducing webapi/tests/mimetypes.py
and webapi/tests/urls.py. mimetypes.py contains the full list of all
expected mimetypes found throughout the test suite. urls.py contains
functions for fetching all the URLs for all resources.

As an aid to urls.py, WebAPIResource now includes functions for
computing the URLs. The ones in urls.py just wrap them to make the
lookups more convenient for the purpose of tests.
Split resources.py into per-resource files.

resources.py has become unmanageable, so it's now split up into a bunch
of different files.

The problem going into this was the interdependency between resources.
At class definition time, they neatly form a tree, but at request
handler time, there are circular dependencies.

The solution to this is to have a Resources class that dynamically loads
the right resources from the right places upon request, and caches
them. All references to resource instances go through this, and it
handles dishing them out. It also handles registering them against
models.

The logic for resources haven't changed. It's just code movement. The
only major change here is the logic in resources/__init__.py.
Fix jshint errors.

A couple jshint errors slipped in recently. Trivial cleanup.
Add filtering for the repository selector.

This change adds a search box for the repository list, which should help for
servers that have a ton of repos connected.

Testing done:
* Tested the animation back and forth to make sure everything was silky smooth
  and drew correctly.
* Added a couple repositories with different names. Checked that searches
  worked as expected.
* Ran jshint.

Reviewed at https://reviews.reviewboard.org/r/4526/
Fix some isues in the API docs.

The file attachment API docs referred to screenshots and not file
attachments in many places. It also had some outdated information about
what could be updated.

The new validation resources weren't marked as being added in 2.0.
Store the docs database as fixtures instead of an sqlite database.

The docs database was painful to merge and update, and sometimes stray
items (from operations that deal with in-database caches) would get
committed. It also outright failed when there were evolutions that
needed to be applied, always.

Now, building any docs target for the manual will rebuild the docs db
from a fixture, if the fixture has changed or if the database is
missing. When adding new items to the database, a modified docs.db can
be dumped using ./scripts/dumpdata.sh.

This should help going forward with some annoyances with our docs
builds.