Currently the test interface_bitcoin_cli.py performs the wallet-relevant parts if any wallet type support is compiled in, independently of
whether the test is run with legacy or descriptor wallet specified. This leads to a failure if the test is started with the --legacy-wallet parameter, but bitcoind is compiled without BDB support, see e.g
#23686 (comment)
Fix this by checking if the specified wallet type (BDB for legacy wallet, SQLite for descriptor wallet) is available.
Should further pave the way for #23682.