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/