`CConnman::SocketHandler()` does 3 things:
1. Check sockets for readiness
2. Process ready listening sockets
3. 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