Fix upgrading from pre-1.7 databases.

rb-site does a check to see if a dedup operation should be run. This
ends up checking some modern fields that didn't exist pre-1.7.

We now wrap this and catch the exception, handling the case where the
operation fails due to a database error. The assumption we make is that
if there's a database error, we're likely upgrading from a database that
doesn't have these columns, and a dedup is probably needed.

Reviewed at https://reviews.reviewboard.org/r/5756/
Prevent caching of filediffs when condensing diffs.

Some users reported running out of memory when attempting to condense
diffs on large databases. This is caused by Django's default behavior
of caching retrieved objects when evaluating a queryset. It'd end up
caching all objects it'd fetch, eating up all memory.

Using iterator() bypasses this, preventing caching and giving us the
objects directly. It should prevent the memory issues people were
hitting.
Merge branch 'release-2.0.x'