Do not close the pipe sockets when retrying
Rewrite Reactor#run_in_thread

- Log both error message and backtrace to STDERR
- Reintroduce pipe closing when thread exits
Handle IOError closed stream in IO.select

If the other end of a socket is closed, select causes an IOError.
Attempt to fix this by retrying the operation with any closed socket
removed
Use real blocks instead of Symbol#to_proc
Merge pull request #398 from grddev/reactor-loop

Reactor loop fixes