simplify default callback
request accepts an optional callback
catch exceptions in callback
add comment to explain why stanza ids are skipped
try to reconnect when socket disappears

The listener uses the `select` system call to figure out if the socket is
readable.  When the socket disappears `select` will always indicate that
the socket is readable, but all that can be read is EOF.  This will cause
the listener thread to race through the loop, burning cycles for nothing.

When the socket has been closed, the thread now blocks until the socket
re-appears.