Check for closed sockets before attempting a rpc

Ensure that the socket we've selected has been read from within a
second.  If it hasn't, check if it's closed by polling for readability
and if that works, MSG_PEEK'ing a single byte.  If we get eof, or an
error, we can assume it's broken.  This lets us avoid a large class of
transient network failures.
If you return 0 bytes, you've reached eof and the socket is closed.  We already know pollin worked, so there should be at least one byte available despite the non-blocking read.

It's not that there are any bytes to actually read in the networking layer, the pollin just means you've queued up the eof (which is synthesized to a recv of 0)