moveonly: factor out headers processing into separate function
Summary:
ProcessMessages will now return earlier when processing headers
messages, rather than continuing on (and do nothing).
This is part of Core PR11568
Depends on D1764
Test Plan:
make check
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1777