[net processing] Add IsBlockRequested() function
Summary:
MarkBlockAsReceived() should not be used for both removing the block
from mapBlocksInFlight and checking whether it was in the map.
This is a partial backport of core#22141
https://github.com/bitcoin/bitcoin/pull/22141/commits/62993507336be06490b202b3955d4830a99e9e34
Depends on D12707
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, sdulfari
Reviewed By: #bitcoin_abc, sdulfari
Differential Revision: https://reviews.bitcoinabc.org/D12708