Allow importprivkey, importaddress, importpubkey, and importmulti RPCs to be called with rescan=True option on nodes with pruned blockchains (started with -prune option). Instead of returning errors, the RPCs will now look for transactions spending to the key in the UTXO database, and display them in the wallet.
Because the UTXO database doesn’t store full transaction information (it discards TxIns) this change introduces a new “fIncomplete” CWalletTx member to distinguish these from normal wallet transactions.
This change makes the -prune mode usable with wallets that need to import keys after the initial sync.
Fixes #8497.