Implements a bunch of one liners: UpgradeKeyMetadata, IsFirstRun, HavePrivateKeys,
KeypoolCountExternalKeys, GetKeypoolSize, GetTimeFirstKey, CanGetAddresses,
RewriteDB
Backport of Core [[https://github.com/bitcoin/bitcoin/pull/16528 | PR16528]] [18/43] : https://github.com/bitcoin/bitcoin/pull/16528/commits/4cb9b69be031e1dc65d8964794781b347fd948f5