(Own)Identity.upgradeDatabaseFormatVersion5...(): Make idempotent
WebOfTrust: Fix database upgrade for versions before 5

As part of upgradeDatabaseFormatVersion5(), classes Identity and
OwnIdentity have recently been changed to store FreenetURI as String in
a new member variable. The old member variable which stored it as
FreenetURI is set to null by Identity and OwnIdentity constructors. The
upgradeDatabaseFormatVersion5() would convert the old FreenetURI member
variable to the new String member variable, and set the old one to null.

Unfortunately, the logic when to do the upgradeDatabaseFormatVersion5()
migration was faulty: It would be done AFTER the old
upgradeDatabaseFormatVersion1(), ...2(), ...3(), etc. The old upgrade
functions would mess with (Own)Identity objects, and during that their
code  would throw because it tried to access the new String
member variable which was still being null.

To fix this, this commit changes the upgrade logic to call the
upgradeDatabaseFormatVersion5() BEFORE any other database upgrade code.
As a consequence, it is renamed to upgradeDatabaseFormatVersion12345(),
also for (Own)Identity.
Further, the point when we call upgrade...3() is changed to be even
before upgradeDatabaseFormatVersion12345(): The upgrade...3() function
attempts to delete leaked FreenetURI objects, which will only work will
(Own)Identity still stores them as FreenetURI, it wouldn't work after
the String conversion.

I have tested this significantly with old databases down to version 2.
It seems to work.
Thus, with this commit, the adaption of WOT to compile against
purge-db4o can be considered as finished :)