Descriptor wallets don't support dumpwallet, so make the tests that do
dumpwallet legacy wallet only.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19077 | core#19077]] [25/26]
https://github.com/bitcoin/bitcoin/pull/19077/commits/310b0fde04639b7446efd5c1d2701caa4b991b86
Depends on D10572