Delete pending commands on reset

* If an exception is raised in the Ruby process, it's possible for Reset
  to be sent to the server while the previous command is still running.
  This ensures that pending commands are stopped when handling Reset.
Make FindModal synchronous

* There's no need to poll for the modal when we have an event loop.
Make Connection#gets non-blocking

* JRuby Timeout::timeout blocks on IO#gets. IO.connect blocks as well
  unless running in its own thread.