Fix a bug in the database upgrade process, and refactor slightly.

During upgrade from v9 -> v10 the database version was not
being updated.

Also remove conditionals based on what are effectively hardcoded
truth values to simplfiy the logic greatly.

Bug: 5560410
Change-Id: I31a01aa35a109a951d4e4c6d5b884bb666668b28
1 file changed