fix: handle error when opening initial url

Example of the problem:
https://travis-ci.org/angular/angular.js/jobs/24101767#L2645
https://saucelabs.com/tests/edcfa4e9844f4a9ea8402366d8d2ebf7

For some reason (probably a network error on Travis), navigation to
Karma capture page failed. With this fix, it will fail the launcher and
therefore Karma will try to start the browser again. Even if the network
error would remain, at least Karma fails instead of waiting for Travis 
timeout.
fix: handle error when sending heartbeat