Added validation for API policies.

This introduces WebAPIToken.validate_policy, which will look through a
policy definition and try to find any errors. It will check for required
data, data in invalid formats, policy IDs validity, and more.

This is called when posting or updating a policy, and the error will be
returned in the API error.

Reviewed at https://reviews.reviewboard.org/r/6164/
Add a My Account sub-page for managing API tokens for the user.

The My Account page now provides an "API Tokens" sub-page for displaying
all the user's tokens, globally and across Local Sites. These are
displayed as a list of tokens, grouped into Local Site sections (just
like the Groups page). Each section allows the user to generate a new
token with just one click.

Each token can be described through an editable note field immediately
below the token value. Saving this field immediately updates the token
on the server.

Next to each token value is a drop-down for selecting the token policy.
This defaults to "Full access," but "Read-only" and "Custom" are also
available values.

"Custom" will display an editor that the user can use to craft a custom
policy for that token. This editor uses CodeMirror to do JSON syntax
highlighting, auto-indentation, and lintian checking. The user can save
the token and close the editor, or save and continue editing in order to
help with debugging/testing access through a token.

Reviewed at https://reviews.reviewboard.org/r/6163/
Fix issues with the extension documentation.

There were a few issues with the documentation on extending Review Board, which
this change fixes:

* The "Django apps" link was undefined.
* The "Django Evolution" link was pointing to a useless page.
* "fieldset_id" was being used instead of "field_id" in the
  ReviewRequestFieldsHook examples.

Reviewed at https://reviews.reviewboard.org/r/6167/
Fix a couple trivial issues with the API token form.

With the new(er) validation code, creating a new token was failing,
since the default was 'null' instead of {}. This caused a failure in
validation that didn't previously exist.

Also, the My Account CSS bundle was named with a .js extension,
preventing it from loading. This fixes the name.
Remove propertyUtils.js from RB, now that we have the Djblets version.

Review Board was still using propertyUtils.js, even though Djblets
now bundles this for us. This caused the RB version ended up
overriding the Djblets version. The Djblets version is more featureful,
so that's a bad thing.

This removes it from the tree and the bundles.
Merge branch 'release-2.0.x'
Pass SVN credentials when accepting a self-signed certificate.

When accepting a self-signed certificate, the SVN credentials weren't
being passed. This could result in a breakage for installs that blocked
anonymous access.

accept_certificate() is now set up to take the credentials, which the
form passes. Those are then passed to build_client for SVNTool.

This fixed some issues I was able to hit with adding repositories with a
self-signed cert and that required authentication.

While here, I also fixed a missing space between two sentences in an
error message that I came across when setting up an environment for
this.

Reviewed at https://reviews.reviewboard.org/r/6171/
Merge branch 'release-2.0.x'
Backport a small CSS cleanup with .file-container and .file.

In 0105e3f on master, the '.file-container .file { .. }' rule was split
into '.file-container { .file { .. } }'. This change backports this to
release-2.0.x, in order to help with some upcoming changes and merging
of those changes.
Move the common inline editor CSS rules into common.less.

The inline editor CSS rules were in reviews.less, which wasn't very
useful to pages other than the review pages. The new inlineEditor usage
in the My Account page didn't have the proper styling because of this.

This change moves those rules into common.less. It also changes the
button input margins to be on the left instead of the right, and to
remove the left margin of the first input. (It's easier to remove
leading spacing on the first element than the last, since :first-child
is better supported.)

The styles specific to editors on the Review Request box have also
been moved into the .review-request, in order to prevent them from
affecting other editors unintentionally.

Reviewed at https://reviews.reviewboard.org/r/6174/
Set line-heights on the inline editor elements.

The new fixes to inlineEditor requires that the consumers take the
responsibility of setting line-heights, in order to keep text from
jumping. This sets the appropriate line-heights for the general inline
editors and for the change description field.

Reviewed at https://reviews.reviewboard.org/r/6175/
Add buttons for the file attachment caption editor.

The file attachment caption editor didn't show any buttons, which was
confusing to users. The problem was that there wasn't a great place to
put the buttons.

This change fixes this by adding a section just below the editor. The
buttons appear on a greyish background, and sort of just appear below
the thumbnail, overlapping any thumbnails that may be below it. The
reason it overlaps it to prevent any shifting/staggering of other
thumbnails.

Some work had to be done to properly set offsets and to change sizes of
the caption elements, in order to cleanly overlap anything below.
The sizes are set so that the overlap completely obscures the header
text from a thumbnail below, which is nicer-looking than ony
partially-obscuring the text.

Reviewed at https://reviews.reviewboard.org/r/6176/
Improved the unfocused look for file attachment captions.

The file attachment caption editors looked pretty bad when unfocused.
The red box shadow poked through the sides, just barely, which looked
bad. Instead, we now show a reddish background, making it clear that the
caption needs attention.

Reviewed at https://reviews.reviewboard.org/r/6177/
Fixed extra whitespace issues in review request editors.

The file attachment thumbnails and editors on the right-hand side
of review requests had bugs where they would show extra leading
whitespace on edit. This happened because the HTML had whitespace for
formatting, which ended up in the edit field.

The templates for these fields are now compressed down to not have any
extra whitespace. This makes the templates less readable, but ensures
that the only whitespace in there is whitespace provided by the value
server-side.

Reviewed at https://reviews.reviewboard.org/r/6178/
Show buttons for all review request field editors.

Users were getting confused about how to save fields on the review
request page, since we removed the buttons in Review Board 2.0. This
change helps to solve that by adding back the buttons.

The fields on the side of the review request now have buttons once
again. Instead of taking up precious space on the field's line, they now
appear below the field instead.

The buttons are a bit smaller to help visually fit, and spacing is added
to help keep them from bumping up against neighboring fields. Any
fields below will simply shift down while the buttons are shown.

Fixes bug #3474
Reviewed at https://reviews.reviewboard.org/r/6179/
Merge branch 'release-2.0.x'
Fix some missing variables from the merge.

Some .lesscss variables went missing from a bad merge. This restores
them.
Fix chainability of $.fn.*_infobox

When I consolidated the code for the infoboxes, I broke jquery chaining. This
wasn't immediately obvious because it was only used for the user infobox
created from a draft reply comment (the "Add Comment" handler). This change
fixes it.

Testing done:
I could "Add comment" again.

Reviewed at https://reviews.reviewboard.org/r/6184/