Fix #382, #404 jruby pending test

We grab all the output from PhantomJS (like console.log) in another thread and
when PhantomJS exits first as in related test when we send `driver.browser.command('exit')`
we will try to restart it. In order to do it we stop the server and the client.
For the client we see error `IOError: Stream closed`. It happens because jruby
tries to close pipe with https://github.com/jruby/jruby/blob/jruby-1_7/core/src/main/java/org/jruby/RubyIO.java#L2067
which raises an error here https://github.com/jruby/jruby/blob/jruby-1_7/core/src/main/java/org/jruby/RubyIO.java#L4753
It happens not just because IO was closed but because it was blocked on `eof?`
or `readpartial` call. As you can see the error will be raised in related thread
(it's not actually main thread but the thread that listens to the output) that's
why if you put some debug/puts code after `rescue IOError` it won't be shown and
in fact the main thread will continue working after the raise. In here:

    def restart
      stop
      start
    end

it will invoke `start` even if we have seen `IOError` in `stop` method because
the error has been in the another thread.