Add some hg repo internal data to .gitignore
Handle parse errors during diff migration.

The new diff size column would cause migrations for old diff data. In the case
where a very old review request has un-migrated data which doesn't parse
correctly (from back when you could attach a bogus diff to a review request),
it would cause an un-caught exception. This change handles DiffParseErrors in
the recalculate_line_counts method.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5485/
Trust the user when they say that their server name starts with 'https'

We have a long-standing bug where someone would configure Review Board to use
HTTPS only, but due to proxies or other methods, the HttpRequest wouldn't think
it was https. This meant that any URLs created by the Django resolvers would
start with 'http' instead of 'https'.

Because we know what the user configured their server name as, we can choose in
load_site_config() whether to set the 'HTTPS' environment variable or not. We
also need to set wsgi.url_scheme to 'https' in request.META for wsgi-based
clients.

Testing done:
Configured my devserver with a server name starting with "https" and fetched
the API root. Saw that all the links returned started with 'https'.

Fixes bugs 3085, 3246.

Reviewed at https://reviews.reviewboard.org/r/5490/
Merge branch 'release-1.7.x'
Move diff change description handling into a new DiffField.

DiffField is now responsible for recording change entries for new diffs,
and for showing those entries. This logic is no longer hard-coded into
the template, review_detail view, or ReviewRequestDraft.publish.

Since this (and other similar upcoming fields) require access to state
generated during the review_detail view, I've added an internal
BuiltinLocalsFieldMixin that takes in a locals() and extracts necessary
data from it. This is only meant for internal usage.

The rendered output from DiffField looks the same as it did in the
template. An upcoming change for better change entry rendering will
improve this output a bit.