Filter unwanted upstream lines from interdiffs.

Interdiffs had a long-standing problem where, after merging, any
upstream changes from a subsequent diff would get rolled up into the
display of the diff. This was annoying particularly for very active
trees, and made it hard to see exactly what was changing.

We now filter these from the interdiffs. We start off by parsing both
diff files and find the line ranges (the "@@" lines). We can then use
that information to completely filter out changes that aren't in the
ranges.

To get as close as possible to what the user actually uploaded, we
strip away some additional lines from those ranges. By default, all diff
programs we've seen generate 3 lines of context to make the diff more
readable, meaning that the ranges are extended by 6 lines on either
side. We just reduce the ranges by 6, ensuring that only the modified
lines are considered for display.

Any lines that aren't to be displayed as inserts, deletes or replaces
get turned into "equal" lines. The user may notice that they're not in
fact equal (especially when it's deleted/inserted lines), but that
should be fine as the point is to get them to focus on the changes from
the diff itself, not the upstream changes.

It's still possible that some additional upstream lines will make it in,
but only when they're right inbetween some modified lines within the
same hunk of the diff.
Tighten up some of the interdiff file mapping logic.

We have a long-standing bug where, sometimes, an interdiff will have
problems when there's a file changed in one revision of a diff and then
reverted in another. While it's supposed to show that file as reverted,
this didn't always happen.

We determine that a file should be shown as reverted if we store the
force_interdiff flag for that file (which is based on there being an
interdiffset object). We seem to do that pretty reliably, yet it
sometimes screws up anyway.

The only thing I can think of is that we were comparing against None
incorrectly. Perhaps in some weird corner case, the comparison was
providing the incorrect result. Now, we use "is not" instead of "!=" for
this comparison.

I've also changed the logic to use generators where possible. Should
be more efficient (though barely).
Update our "Use post-review" to "Use RBTools."

This updates the text and link to point to RBTools, and rewords the text
a bit.
Add support for self-hosted hosting services.

Now, hosting services an be marked as "self-hosted," which will cause a
"Domain" field to show up for the service above the account entry. Many
of the functions now take a domain.

Accounts now take a domain as well, and we filter registered accounts by
the domain.

Bug trackers have the same sort of setup as well.

GitHub's had a few more changes added to it for cleanup to use the
hosting URL and to not duplicate so much code.

Unit tests were added for all of this.
Move the review banner code out into a DraftReviewBannerView.

DraftReviewBannerView handles showing/hiding the banner in response to
events on the draft review, and handles the buttons on the banner.

DraftReviewBannerView is a singleton. It's created once up-front.
Callers can access the instance through
RB.DraftReviewBannerView.instance in order to show or hide the banner.
Add new models and views representing review boxes and reply UI.

The complexity around making a reply to a review or to one of the three
types of comments on a review is now safely confined to a
ReviewReplyEditor model. This knows how to save the reply and remove it
when the reply is cleared.

There's an equivalent view, ReviewReplyEditorView, for handling the
reply UI for a thread of discussion.

A ReviewBoxView manages the ReviewReplyEditorViews for each comment and
body top/bottom, as well as the collapse state and the reply banner.

A ReviewBoxListView manages all the ReviewBoxViews on a review request
page. It deals with loading the ReviewBoxes, their equivalent Reviews
(based on properties in the HTML), and handling Collapse/Expand All.

Unit tests were added for all this.

The new design drastically reduces the number of <script> tags on the
page (used to load each comment reply section). These were probably very
fast to load, but it's nice not having them, as technically they slow
down the rendering of the page, and we have fewer document.ready
handlers.
Merge branch 'release-1.7.x'
Don't redefine gCommentIssueManager.

This was causing a page load error. gCommentIssueManager was being set
in the page template, but being overridden locally in reviews.js.
Fix the Open Issue checkbox.

The default value for the Open Issue checkbox after loading a comment
was based on this.defaults.openIssue, but this.defaults was a function.
It now calls that and access openIssue from the resulting object.