Rework code in run-webkit-tests to handle device failure properly.

This adds a DeviceFailure exception type which should be thrown whenever we detect something fundamentally wrong with the device (or when we can't connect to it at all). That should trigger the worker/child to exit after telling the manager to retry the remaining tests in the shard (including the one that failed) in a different worker.

Using an exception rather than propagating an error back makes things a bit cleaner and more flexible, I think.

R=abarth@chromium.org, ojan@chromium.org, peter@chromium.org
BUG=305040

Review URL: https://codereview.chromium.org/76053002

git-svn-id: svn://svn.chromium.org/blink/trunk@162318 bbb929c8-8fbe-4397-9dbb-9b2b20218538