Return a status enum from ScanForWalletTransactions
Summary:
Return the failed block as an out var. This clarifies the outcome as the prior return value could be null due to user abort or failure.
Partial backport of core PR13076:
https://github.com/bitcoin/bitcoin/pull/13076/commits/3002d6cf31821622e9f21d51e536cafc5cfb10ae
Depends on D5561.
Test Plan:
ninja all check check-functional
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5562