Fix the dashboard's multi-selection with reloading.

There were a couple bugs causing multi-selection to break when
reloading.

First, the timer pausing logic wasn't working, due to a typo in a
variable name. This also resulted in toggling a checkbox causing
multiple timers to start and stack.

Second, after a reload, the events for the actions in the sidebar were
no longer hooked up. This is fixed by a simple delegateEvents() call.
Fix a breakage in get_credentials when unable to load a hosting service.

If Repository.get_credentials was unable to load an account's associated
HostingService, then it would fail trying to call a function on None. It
now checks that the service is loadable before trying.
Add useful query parameters to filter lists of repositories.

This adds a handful of query parameters for filtering lists of
repositories by various criteria. This allow filtering by name,
path OR mirror path, name OR path OR mirror path, tool name, hosting
service ID, repository username OR hosting service username.

Each of these supports a comma-separated list of values, which work as
an OR.

We'll be able to use this in RBTools to make repository lookups faster.
Merge branch 'release-1.7.x'
Fix links for file attachment URLs on CDNs in e-mails.

File attachment URLs on CDNs weren't showing up correctly in e-mails. We
were prepending the http(s)://domain to them, which was a problem when
that was already included in the URL. We now guarantee that
FileAttachment.get_absolute_url will return an actual absolute URL,
domain included, and it will only prepend the http(s)://domain if it's
not already there.
Fix z-index issues for the AJAX spinner and headbar menus.

The z-index for the AJAX spinner caused it to appear below the review
dialog, which looked a bit wrong. It's now set to be higher.

The user and support menus were also appearing above everything else,
due to an attempt at fixing a z-index issue in the admin UI with grid
filters. Turns out we had a rule for the filters to set the right
z-index, but it was being overridden. We now force it, and no longer
have the custom z-index.
Fix a couple errors with adding GitHub repositories.

The introduction of HostingServiceError broke InvalidPlanError's
constructor chaining, leading to bad error messages. This was found
because of a larger problem, which was that some new restructuring
prevented 'plan' from being set. GitHub depends on this, and was
throwing an error when it was passed None.
Filter out users not on the LocalSite when sending e-mails.

Users who were previously listed as a reviewer on a review request
belonging to a LocalSite, or participated in the discussion, would
continue to receive e-mails related to the review request after removed
from the LocalSite. This isn't ideal, as they shouldn't have had any
access once removed.

We now filter out these users when sending an e-mail. Both the
target_people list and the review participants are considered when
filtering.
Fix JavaScript unit tests.

Some older changes broke JavaScript unit tests. The changes themselves
were fine, but the unit tests weren't updated to match new behavior.
This fixes them so that we're back to all tests passing.
Fix issues with doc generation.

The doc generation was broken due to some old data in fixtures that no
longer corresponded to any valid fields, and due to an invalid value
type in the decorator for the new 'text_type' fields.
Merge branch 'release-1.7.x'
Fix unit test breakages from the recent merge.

The recent merge was pushed too soon, and broke unit tests, due to
differences on the release-1.7.x branch. This restores the test suite to
working order.
Fix user lookup in ReviewRequest/ReviewRequestDraft API resources.

The original intention was to retrieve the first available user in
auth.get_backends(). However, if an exception happens in the try clause,
it goes to the except which passes and then the variable "user" is not
initialized. The function get_or_create_user either returns an actual
user, None, or throws exception.

Reviewed at https://reviews.reviewboard.org/r/5189/
Stop showing empty space in the review request box.

On a blank or short review request, the review request box would show
the text areas and then empty space. This was pretty ugly.

We now fill in the remaining space with the last textarea (Testing Done
by default, though this should adapt to custom extension-provided text
fields when those are supported). It will take up the full height,
cleaning up the look.

When the field reaches a point where it'd otherwise extend past those
initial bounds, it will just behave as it did before, autosizing to fit
the content. This ends up feeling pretty natural. As you type in,
say, Description, Testing Done gets pushed down in order to accomodate
Description's size (as it did before), but the bottom now stays
anchored, up until the point where the field hits its natural size and
starts increasing the size of the review request box.
Size the autocomplete list appropriately and keep it in view.

The autocomplete results list was using a default size of the input,
which was fine with the old review request layout, but was rather
squashed with the new one. It also would scroll off the size of the page
pretty easily.

We now give it a default width for the review request autocompletes that
extends out a bit, giving enough room for the contents.

The results list is also now smartly positioned to stay on-screen. It
will find a suitable edge to dock to ensure it can be seen in full.
Fix building of static media for extensions.

The static media building support for extensions depended on a
settings_local.py file somewhere in the path, which we had due to
running setup.py develop on our dev environments, but users won't on any
site installs.

We now package a nearly blank settings_local.py file and use that for
the static media building.
Add support for publicly-accessible LocalSites.

LocalSites have always been locked down to members of the groups, but
there are advantages to allowing for anonymous access when simply used
for partitioning of a server by teams/organizations.

This adds a public flag to LocalSite. If set, non-members will be able
to access anything that's considered public within the LocalSite. This
essentially gives it the same behavior as a standard site.
Move all our review request field logic into new field classes.

This introduces a new set of classes and functions for representing
fields on a review request. These classes are responsible for rendering
the list of fields on the review request page, loading values from the
database, saving from a draft, recording change description info, and
rendering that change description info.

Fields are grouped by Fieldsets. There are three default fieldsets:
"main" (the area for Submitter, Description, and Testing Done), "info"
(Repository, Bugs, etc.), and "reviewers". Additional fieldsets can be
registered, and fields placed in them. These will render on the side,
below Reviewers.

This work allows us to simplify a lot of our template code for the
review request, as well as the change description rendering code. It
also allows us to provide a level of extensibility for fields. Soon,
extensions will be able to easily provide their own fields on a review
request.

There's also a small but measurable impact on load times. By reducing
the work the template has to do, one review request I have with about 10
change descriptions saves about 10ms of render time.
Add base-level support for extra_data to BaseResource.

Several of our API resources now support custom extra_data values. This
moves the support for this on the JavaScript side into BaseResource,
making it very easy for a subclass to work with extra_data.
Fix the display of datagrid on the user page.

The recent changes to the dashboard introduced a wrapper element that
wasn't added to the user page. This was needed to keep the position
correct for the sidebar and datagrid.