Version -> 7 (for play store upload).
Handle database version upgrades on in-place open.

This allows us to upgrade databases during app upgrades and not just on
import.

Also improves some error log entries and the error message shown on
database upgrade failures.