rpc: Improve importdescriptor RPC error messages
Summary:
Particularly add more details in the case of pruning or assumeutxo.
This is a partial backport of core#30909
https://github.com/bitcoin/bitcoin/pull/30909/commits/d73ae603d44f93e4d6c5116f235dd11a0bdbf89c
see D10159 for GetRescanErrorMessage and why this affects a wallet test that imports keys
Depends on D17926
Test Plan:
ninja all check-all
Also covered by another test in wallet_assumeutxo.py on my dev branch
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17927