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/