Correctly detect end-of-file for a socket

Apparently it's not safe to mix system calls (`recvfrom`) and
buffered IO methods (`eof?`). I found a couple mentions of this,
nothing definitive, but when I tried using this in Sanford, I
ran into issues with an error message like:

`"recv for buffered io"`

It seems the only proper way to detect "end-of-file" (closed on
the remote end) for a socket that uses `recvfrom` is to see if it
returns a response of 0 bytes. This produces the same result of
the previous implementation (in this gem), but additionally works
as expected in Sanford.