Fixes #11716.
This adds a walletdowngrade [version] RPC method.
It currently only supports downgrading to v0.12, which removes the HD seed (without deleting previously generated keys). Once downgraded, there's no way back, since there's currently no mechanism to upgrade non-HD wallets.
I don't know if v0.12 downgrade support is at all useful. If not, the code can be reused for adding downgrade support for the upcoming (perhaps more risky) SegWit related changes.
Todo:
- actually test with v0.12 wallet
- add functional test
- add release note (?)