Take out `Process.kill` logic into separate method
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 server and client. We see this error `IOError: Stream closed` for the
client. 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 code after `rescue IOError` it won't be shown and in
fact the main thread will continue working after the raise. For instance:

    def restart
      stop
      start
    end

it will invoke `start` even if we have seen `IOError` in `stop` method because
the error has been raised in another thread. In order to fix it we don't have to
give a chance to block IO. `IO.select` shows that there's something to be read
in pipe.
Add test for within_frame with frame index.

See #185.
Merge pull request #411 from jimjh/master

Add test for within_frame with frame index.
update cliver dependency to pull in upstream fixes
Specs are green
Fix #414 ability to pass element to `within_frame`
Leave an ability to find frames by element id as well as name
Clean up client spec
#202 Add send_keys basic implementation
Update capybara dependency
Add go_back and go_forward implementation in poltergeist capybara driver
Added in capybara 2.2.0
Allow change the contents of a contenteditable element
Add CHANGELOG entry
Merge pull request #416 from pedrocarrico/master

Update capybara dependency
Entering negatives into an <input type="number">

When entering a negative number into a value field. The absolute value
would instead be set. This is because values are entered char-by-char
and '-' by itself wasn't considered a valid value.

This modifies PoltergeistAgent.Node.set to set the entire value at once
for an input type=number. Number fields aren't necessarily set via
keypresses anyways (they have those little buttons).

Includes a failing test case.

This change may be unnecessary if native keyboard events are used
again (landed in c7ba561, reverted in 70304cc).
Add CHANGELOG entry
Merge pull request #421 from jhawthorn/input_type_number

Entering negatives into an <input type="number">
Catch the IO error for JRuby platform
Fix build on Travis for Rubinius