Allow retry in http connection to remote webdriver

PhantomJS+GhostDriver as of PhantomJS version 1.9.2 does not enable
http keep-alive which results in failure to communicate with the
webdriver after the first request.

Other implementations of webdriver servers may also close the connection
after a timeout - in which case a retry will ensure that the next command
doesn't fail.