[net processing] Tidy up MarkBlockAsReceived()
Summary:
This is a partial backport of core#22141
https://github.com/bitcoin/bitcoin/pull/22141/commits/2c45f832e87acd11fbd144cc0bb8e49816933c70
Depends on D12708
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, sdulfari
Reviewed By: #bitcoin_abc, sdulfari
Differential Revision: https://reviews.bitcoinabc.org/D12709