Add a JavaScript view for showing modal dialogs.

RB.DialogView is a wrapper around $.modalBox() that makes it easy to
construct, show, and hide modal dialogs. It can be instantiated and
bound to an element to show the contents of that element as a dialog, or
it can be subclassed to allow another view to act as a dialog.

Reviewed at https://reviews.reviewboard.org/r/6305/
Add a central function for returning the server URL.

We had a lot of code that attempted to build a server URL by fetching a
Site, SiteConfiguration, doing a URL lookup, and building a string. This
was getting silly, so I've added two central functions for this purpose:
get_server_url() and build_server_url().

get_server_url() returns the URL to the root of the server (or a Local
Site, if one of the identifying arguments are provided).

build_server_url() builds a URL off of the server URL. It's a
convenience around calling `urljoin(get_server_url(), ...)`.

Many call sites have been updated to use these new functions. Many still
remain, as we have templates that are building their own URLs, and some
code that's doing fancier URL building, and I didn't want to risk
breaking them right now.

This also fixes a bug with the e-mail headers. We were always referring
to the root of the site, rather than the Local Site, which made it
harder to filter when working on multiple Local Sites.

Reviewed at https://reviews.reviewboard.org/r/6307/
Fix review dialog js-tests.

I had fixed up some of the relevant tests during my overhaul of the review
dialog, but apparently the last time I ran them was before I removed
_bodyTopEditor and _bodyBottomEditor. This change fixes those tests to use the
new _bodyTopView and _bodyBottomView, and does a little bit of extra cleanup
while I was in there.

Testing done:
Ran js-tests. After this change there are still some failures, but all of the
review dialog tests now pass.

Reviewed at https://reviews.reviewboard.org/r/6308/
Fix bug-id format string in js-tests.

The tests for linkification of bugs was never updated when we merged the new
bug-tracker stuff, and so it was still using '%s' instead of '--bug_id--'. This
change fixes that.

Testing done:
Ran js-tests.

Reviewed at https://reviews.reviewboard.org/r/6309/
Offer helpful RBTools setup instructions in the repository list.

This updates the repository list to have helpful action links for
getting RBTools configured against that repository. When the admin
clicks "RBTools Setup", it will pop up a modal dialog box showing the
setup instructions for that given repository.

To make room for the new column, I've also shortened the label for the
"Show this repository" column in the repository list. Upcoming changes
will add new actions to this list.

Reviewed at https://reviews.reviewboard.org/r/6306/
Only show the drag and drop indicator when the review request is editable.

If a user wasn't logged in, or they didn't own a review request, they would
still see some visual feedback when dragging files over their browser window
inviting them to upload the file. This change fixes that.

Testing Done:
Ran JS tests.

Tried to drag-and-drop a file:
  as the creator of the review request - indicator appears
  while signed in as an admin - indicator appears
  while signed in as a different user (not admin) - indicator does not appear
  while not signed in - indicator does not appear

Bugs closed: 3542

Reviewed at https://reviews.reviewboard.org/r/6312/
Merge branch 'release-2.0.x'
Reject PUT with a changenum on file-only review requests.

When updating a file-only review request (which doesn't have a repository), it
was possible to pass in a changenum field, which would then cause a 500 error
trying to fetch the scmtool. This change makes it so that we return
INVALID_CHANGE_NUMBER if there's no repository (since they're all invalid).

Testing done:
- Ran unit tests.
- Used cURL to reproduce the original bug and saw that I got an error message
  instead of a 500.

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