Refactor ProcessGetData in anticipation of avoiding cs_main for ABC
Summary:
This is a refactor only, no functional change.
Partial backport of core PR11824 (commit 66aa1d5)
Test Plan:
make check ./test/functional/test_runner.py
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, deadalnix, jasonbcox
Subscribers: jasonbcox, teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2606