net: move the constant maxWait out of InterruptibleRecv()
Summary:
Move maxWait out of InterruptibleRecv() and rename it to
MAX_WAIT_FOR_IO so that it can be reused by other code.
This is a backport of core#20685 [9/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/34bcfab562bac9887ca9c3831cf4fd0ee7f9814
Depends on D11017
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11018