Update wallet_importprunedfunds to avoid dumpprivkey
Summary:
Removes the use of dumpprivkey so that descriptor wallets can pass on this. Also does a few descriptor wallet specific changes due to different IsMine semantics.
PR description:
This PR updates more tests to have to the --descriptors switch in test_runner.py. Additionally a mutually exclusive --legacy-wallet option has been added to force legacy wallets. This does nothing currently but will be useful in the future when descriptor wallets are the default. For the tests that rely on legacy wallet behavior, this option is being set so that we don't forget in the future. Those tests are wallet_watchonly.py, wallet_import_with_label.py.
Note: this is a PR with many commits, but the commits are mostly independant and can be merged as soon as they are reviewed.
This is a backport of core#18788 [1/16]
https://github.com/bitcoin/bitcoin/pull/18788/commits/a357111047411f18c156cd34a002a38430f2901c
Test Plan:
test/functional/test_runner.py wallet_importprunedfunds
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10653