net: introduce Sock::WaitMany()
Summary:
It allows waiting concurrently on more than one socket. Being a
virtual Sock method it can be overriden by tests.
Will be used to replace CConnman::SocketEvents().
This is a partial backport of core#24356
https://github.com/bitcoin/bitcoin/pull/24356/commits/ae263460bab9e6aa112dc99790c8ef06a56ec838
Depends on D17132
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17133