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