Enable setting attachment thumbnails through the API.

The summary is a bit of a lie. This theoretically allows setting attachment
thumbnails through the API, but it's really just plumbing--it's up to individual
mimetype handlers to actually implement it (if they want).

Testing done:
Used this in conjunction with a review UI extension that takes advantage of it.
Allow users to remove ssh from admin settings.

This change adds a "Delete Key" button to the SSH key settings page, which
allows users to get rid of old keys.

Testing done:
Both manually and unit test passed, includes:
* Creating a key from scratch still works
* Deleting works

Manually tested:
* Clicking Save when there's a key, doesn't trigger any event

Reviewed at http://reviews.reviewboard.org/r/3758/
Fixes bug 2743
Convert the "set submitted" svn hook to new api.

The svn commit hook to set a review request submitted only worked with the
pre-1.6 api. This patch makes it work with the new api. It drops support for the
old api.

Testing done:
Tested on my private setup with reviewboard 1.7.4 and subversion 1.7

Reviewed at http://reviews.reviewboard.org/r/3909/
Enable usage of non-standard SSH ports for connecting to repositories.

This allows rbssh to use a non-standard port when given either the -p
parameter or when a port is in the provided UR (hostname:port).

Fixes bug #2841
Upgrade our copies of Backbone.js and Underscore.js.

We're now using Backbone 0.9.10 and Underscore 1.4.4, which are the
latest versions. These may introduce subtle backwards-incompatibility
problems, but we'll find that out over time. We need these new versions
for some of the new JavaScript code.
Fix server communication and handling in BaseResource.

BaseResource now sends POST/PUT data to the server using encoded form
data instead of Backbone.js's default JSON encoding. It goes through
RB.apiCall for now, so that all our behavior (such as the "Loading..."
indicator) works as expected. It also parses the error response to give
us an appropriate error message from the server.

Some fixes were made to save(). Previously, it would fail to create new
objects, because it didn't have a url at the right time. This needed to
happen after the object was ready and its parent resource, if any, was
known to be created.

parse() now ensures that rspNamespace is filled out, so we don't have
weird 'undefined' errors when a subclass isn't written correctly.

And finally, save(), fetch(), destroy(), etc. take a context parameter
for the callbacks. This is something Backbone.js should really be
providing, since it establishes this pattern with other callback-reated
functions, but it doesn't. We now wrap the callbacks when calling the
parent functions.
Move the comment models to Backbone.js.

Previously, each comment implementation, though similar in
functionality, had lots of duplicate code.

Now there's a BaseComment model that takes care of all core comment
functionality, and subclasses that implement the support for the
specialized attributes they care about.

These objects validate their data when setting and before sending to the
server, to help us catch otherwise non-obvious problems. This is a
pattern I hope to make use of going forward, so that we can provide more
clear errors when we hit bugs.

All the other commenting code (blocks, dialogs) that deal with the
Comment objects had to be updated to make use of the newer-style
properties and events.

Unit tests were added to test the various bits of functionality.
Rewrite the CommentReply objects to be based on Backbone.js.

The new objects perform the same way the old ones did, but share much of
the code and make use of the BaseResource model.

There's a BaseCommentReply that does all the actual work, and subclasses
for diffs, file attachments, and screenshots. All the actual logic is
common, and the subclasses only provide the 'rspNamespace' key used to
parse the payload from the server.

Unit tests were added to cover the base serialization/deserialization
and validation.
Add a new UserSession model, and redo support for starring.

This introduces a UserSession model, which is a singleton that
represents the user's session. It is intended to replace gUsername, and
to provide the API for handling the watched groups/review requests.

The ReviewGroup model has been rewritten to be on Backbone.js and to
make use of this new API.

The existing ReviewRequest code now uses this API as well.

Unit tests were added to test the basic UserSession singleton logic, and
the individual setStarred functions.
Move the diff fragment loading into the new DiffViewer model.

This introduces RB.DiffViewer, which replaces and consolidates our old
diff fragment loading code. It cleans up the API a little and removes a
bunch of redundancy. It also simplifies RB.Diff, which was previously
doing too many different things.

This will later be used to store additional state of the diff viewer,
when that's ported over to use Backbone.
Port RB.Diff to Backbone.js.

The resulting RB.Diff is pretty tiny, since it's just a thin wrapper
over BaseResource's functionality now, and since the diff fragment
support has moved into DiffReviewable.

All it's used for now is for uploading new diffs. It provides an
rspNamespace and a function for returning human-readable error strings,
given an error payload.
Convert RB.Screenshot to Backbone.

This is a fairly trivial change to migrate the old screenshot object to
Backbone.js. The only tricky part of this is that I had to add an indirection
step to BaseResourceModel to ensure that the parent object is loaded before
calling url(), because if we don't have the parent links, we won't have a URL
for the object.

Testing done:
Tested setting screenshot captions and deleting screenshots. Ran js-tests.

Reviewed at http://reviews.reviewboard.org/r/3947/
Convert RB.ReviewReply to Backbone.

This is another relatively simple conversion for the data model for ReviewReply
objects to be based on BaseResource.

Testing done:
Replied to an existing review with body_top, body_bottom, and children
CommentReply objects. Published that reply and saw it get saved correctly.
Verified that loading a draft reply worked as expected. Ran js-tests.
Add a CONTRIBUTING guide.

GitHub will show this when someone's contributing. Hopefully it will
lessen the number of pull requests.
Merge branch 'release-1.7.x'
Add a --web-server-port argument for rb-site.

This allows the user to configure the port that should be used in the
web server configuration. It defaults to 80, so nothing changes there,
but it should be easier to automate a configuration using a different
port (such as when deploying behind nginx/varnish) now.

This is a more advanced option, and is not exposed during the wizard
flow.
Fix references to cgit id=

id2= is actually for SHA-2 hashes, which standard git installations
do not provide.

See https://fedorahosted.org/fedora-infrastructure/ticket/3687 for
additional details.

Reviewed at http://reviews.reviewboard.org/r/3930/
Revert "Fix references to cgit id="

This reverts commit 5c55e7a7d962e3143b3a7e28b0098d0e7139d75c. It
appears that some repositories have problems with this change.
Merge branch 'release-1.7.x'
Move Review Board release notes up one directory

The *.txt files for each release now live in the top level directory
of the release notes, instead of the 'reviewboard' directory. The
release notes for rbtools have been deleted as they now live in the
rbtools repository.