net: split CConnman::SocketHandler()
Summary:
CConnman::SocketHandler() does 3 things:
- Check sockets for readiness
- Process ready listening sockets
- Process ready connected sockets
Split the processing (2. and 3.) into separate methods to make the code
easier to grasp.
Also, move the processing of listening sockets after the processing of
connected sockets to make it obvious that there is no dependency and
also explicitly release the snapshot before dealing with listening
sockets - it is only necessary for the connected sockets part.
This concludes backport of core#21943
https://github.com/bitcoin/bitcoin/pull/21943/commits/f52b6b2d9f482353821da0ef4c485c402a396c8
Depends on D17107
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, roqqit
Reviewed By: roqqit
Subscribers: roqqit
Differential Revision: https://reviews.bitcoinabc.org/D17108