Move headers-direct-fetch logic into own function
Summary:
And move headers direct fetch to end of ProcessHeadersMessage
Review tip:
git show --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
This should show only linter changes due to reduced indentation in the moved code block.
This is a partial backport of core#25454
https://github.com/bitcoin/bitcoin/pull/25454/commits/29c45185223441943ab610e62937a118c7c3a5b2
https://github.com/bitcoin/bitcoin/pull/25454/commits/2b341db731793844f12944363186edea23eabdeb
Depends on D14908
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14909