Properly cache policy rejected transactions for compact block reconstruction
Summary:
The vExtraTxnForCompact vector stores transactions that are cached to avoid an extra roundtrip of transaction requests during compact block reconstruction.
Unfortunately this feature has been lost by mistake during the backport of core#29619 (D16346), which underlines the absence of test for the feature as well.
This diff adds the feature back together with a test that fails on master and succeeds after these changes.
Note that the functional test could benefit from some code polishing but this is out of scope for this diff.
Test Plan:
./test/functional/test_runner.py p2p_compactblocks
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D16474