Allow for saving specific attributes on resource models.

Backbone's save() method accepts an 'attrs' option that contains a
dictionary of attribute names and new values. That's nice and all, but
there are times when you already have data set and want to just specify
which attributes to save.

Our version of save() now allows attrs to be an array of attribute
names. Those attributes will be fetched from the payload and saved,
without any of the other attributes on the model.

Care needs to be taken to only use this option when you know that the
save operation will only require those attributes. Creation of certain
resources may require additional attributes, as may an extension's
extra_data in certain cases. Rather than using this in every save()
call, we should only it where we know it'll make sense.

Some call sites have been updated to use this for simple cases and for
resources working with multiple rich text fields, in order to prevent
stomping over those fields' values server-side.

Reviewed at https://reviews.reviewboard.org/r/6590/
Merge branch 'release-2.0.x'
Fix some text-related issues in the new review dialog.

The new review dialog had some quirks with the new Markdown code.
Publishing would end up saving HTML-formatted versions of the text,
and saving then editing the body top/bottom text would result in an
empty field.

The HTML-formatting issue was due to the way in which we load and then
save the review. Upon loading, we'd force text to HTML, which would then
be saved back out when doing the publish. We had similar issues with the
Ship It and Open An Issue checkboxes.

This was fixed by using the new fine-grained saving, making sure to only
save the fields we care about. I also made some fixes to ensure that
toggling these checkboxes wouldn't cause the stored text to be displayed
as plain text, which was caused by not setting force-text-type and
include-text-types on all requests.

The "empty field on edit" issue was due to using an incorrect variable
when loading the raw value for a field after save. We now use the
correct value.

Reviewed at https://reviews.reviewboard.org/r/6586/
Fix loading review public states and resolving comment issues.

We were deserializing the 'public' state of reviews and replies
incorrectly, which led to problems when operating on any child
resources. One affected set of resources were the comment resources,
which became clearly broken when trying to resolve issues.

Once fixed, I noticed that, like the review dialog, closing an issue
would take the HTML-formatted text originally fetched and send that in
the request. We only need to send issueStatus, and don't want to
override the comment, so we now set an appropriate attrs option.

Reviewed at https://reviews.reviewboard.org/r/6601/
Merge branch 'release-2.0.x'
Add a blank models.py to reviewboard/webapi/.

This will help with import errors when switching back-and-forth between
release-2.0.x and master.
Merge branch 'release-2.0.x'
Fix replying to comments.

When updating the code to be selective about the attributes being
passed, we stopped passing the replyToID. This attribute is pretty
important, and failing to pass it results in being unable to respond to
reviews. This change adds it to the list.
Merge branch 'release-2.0.x'
Don't attempt a doomed request when publishing review replies.

When publishing review replies, we'd attempt to reset the state. Part
of this operation was discarding the reply if empty. However, in the
case of publishing, we've just set up a new reply and know we don't have
a reply sitting around to reset.

We now simply skip this step if publishing.

This also fixes the banner persisting on the screen if discarding twice
in a row.

Reviewed at https://reviews.reviewboard.org/r/6603/
Diff expansion controls now have a delay before appearing.

Diff fragment expansion controls will only expand if the mouse hovers
over the diff fragment for a half of a second. This unifies behaviour
in Firefox in Chrome so that when you scroll down a review request,
the diff fragment controls won't expand as you scroll by.

Scrolling to a diff fragment and stopping now works correctly in both
Firefox and Chrome. That is, the diff fragment will expand as long as
the mouse stays it for half of a second.

The `diffFragmentQueueView` now maintains the number of mouse watchers
so that multiple mouse move event handlers are not added and the event
handler is only removed once there are no active mouse watchers. This
behaviour is used in the case of multiple diff fragment expansion
events and/or scrolling over diff fragments occuring near the same
time.

Testing Done:
Verified in Firefox, Chrome, and Safari.

Reviewed at https://reviews.reviewboard.org/r/6583/
Merge branch 'release-2.0.x'
Add support for Kiln and FogBugz as hosting services.

Kiln and FogBugz are services provided by Fog Creek for repository
hosting and bug tracking, respectively. Kiln does not support any
built-in endpoints for Mercurial file fetching, and the Git hosting is
not compatible with the raw file URL support.

This change adds support for working with repositories stored on Kiln,
and for easily setting up bug tracking at FogBugz.

The Kiln API has almost everything needed for fetching commits for the
New Review Request page, but is just useless enough where we cannot
provide that feature. The primary reason being that the API only allows
paginating from the oldest commit to the newest, and not vice-versa. It
also doesn't really allow us to start at any particular revision. So for
now, we just have basic support.

This also does not support Kiln repository aliases.

Reviewed at https://reviews.reviewboard.org/r/6605/
Allow selecting text in new files again.

The CSS that made text in unrelated columns unselectable when selecting text
wasn't correct in the case of new files (where the "number 1" column uses td.r
for styling). To fix this, I've added a :not selector to verify that we don't
unintentionally disable selection for new files.

Testing done:
Tested text selection in both new and changed files.

Fixes bug 3661.

Reviewed at https://reviews.reviewboard.org/r/6609/
Merge branch 'release-2.0.x'