p2p, refactor: add CInv transaction message helpers; use in net processing
Summary:
Our code differs from core on this part. In order to kept the changes
minimal and limit conflicts I kept our implementation but renamed the
function to match core.
Backport of core#19590.
Test Plan:
ninja all check-all ninja bitcoin-fuzzers
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9500