Disconnect and 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.