Fixes #26463.
This PR prevents a user from unloading a wallet if it is currently rescanning.
To test:
0./src/bitcoin-cli -testnet -named createwallet wallet_name=wo disable_private_keys=true
1./src/bitcoin-cli -testnet -rpcwallet=wo importdescriptors '[{
2 "desc": "addr(mmcuW74MyJUZuLnWXGQLoNXPrS9RbFz6gD)#tpnrahgc",
3 "timestamp": 0,
4 "active": false,
5 "internal": false,
6 "next": 0
7}]'
8./src/bitcoin-cli -testnet unloadwallet wo
9error code: -4
10error message:
11Wallet is currently rescanning. Abort existing rescan or wait.