Correctly store base revision for Mercurial diffs with parent diffs.

Mercurial diffs with parent diffs do not work at all in RB 1.7.7.1 if there is
no overlap between the files in the diff and those in the parent diff.

This change fixes the issue and improves the method of dealing with Mercurial
diffs that was introduced changeset 6b1f537b4cf9. The old method was somewhat
fragile and was broken by changeset 562a8b4a21a9.

Testing done:
Tested using a local repo on which the problem was originally seen.
Added a unit test that tests this scenario.

Fixes bug 2971.
Reviewed at https://reviews.reviewboard.org/r/4121/
Fix the gitweb URL format in the docs.

The example for a raw file URL using gitweb said to use hb=<revision>, but the
correct format is h=<revision>

Fixes bug 3027.
Tell users to back up their database before upgrading their sites.

We do this when we're answering people's questions on the mailing list, so we
should probably do so in the docs as well.
Fix ValueError when the user enters a bad cache host.

If the user enters a cache hostname which doesn't split properly, it makes the
admin site unavailable. This is because the cache stats code was just blindly
trying to unpack the values without any error handling. I've updated it to
cache this case, log, and continue.

Fixes bug 3049.
Reviewed at https://reviews.reviewboard.org/r/4402/
Merge branch 'release-1.7.x'
Merge branch 'release-1.7.x'