Introduce two high level, convenience methods in the `Sock` class:
* `SendComplete()`: keep trying to send the specified data until either successfully sent all of it, timeout or interrupted.
* `RecvUntilTerminator()`: read until a terminator is encountered (never after it), timeout or interrupted.
These will be convenient in the I2P SAM implementation.
`SendComplete()` can also be used in the SOCKS5 implementation instead of calling `send()` directly.
This is a backport of core#20685 [12/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/42c779f503eb8437b6232773a4a2472306cc9f3d
Depends on D11022