Revival/rebase of #11085
Adds a new command sethdseed
which allows you to either set or generate a new HD seed to be used. A new keypool can be generated or the original one kept and new keys added to the keypool will come from the new HD seed.
Wallets that are not HD will be upgraded to be version FEATURE_HD_SPLIT when the sethdseed
RPC command is used.
I have also add some tests for this.
Additionally -upgradewallet
can now be used to upgrade a wallet from non-HD to HD. When it is used for such an upgrade, the keypool will be regenerated.