[backport#15870 1/3] wallet: Only fail rescan when blocks have actually been pruned
Summary:
https://github.com/bitcoin/bitcoin/pull/15870/commits/faf3729242c5e9486e137e549f05bf20bd3908a0
Partial backport of Core PR15870
Test Plan:
ninja all check ./test/functional/test_runner.py wallet_import_rescan
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7014