initial changes to help make run-webkit-tests device-fault-tolerant

This patch posts a set of changes to run-webkit-tests adding the
concept of an 'offline device'. The basic idea is that we may detect
that one of the devices attached to a host has gone offline, and we
should try to recover from that, continuing to use the remaining
devices and retrying any tests currently scheduled for that device.

The basic idea is to have the worker detect that the device has gone
offline, post a message back to the manager with the list of tests
remaining in the shard, and then bail out. The manager will then
run a second pass of shards against the remaining online devices (if any).

This is slightly suboptimal (stopping and restarting the content shells
for the retry pass) but simple, and should happen rarely and in a case
where we're already going to be going more slowly. We can improve this
later if we need to.

This patch adds most of the generic logic needed to support this,
but does not change the android.py code to take advantage of it; that
will follow in separate patches.

R=ojan@chromium.org
BUG=305040

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159169 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix Range.insertNode when the inserted node is in the same container as the Range.

When Range.insertNode is called on a collapsed Range, with a node
that is in the same container as the Range, the Range offsets are
incorrectly updated. This results in Debug asertions and incorect
Release behavior (and maybe more serious problems).

The fix correctly accounts for situations in which the inserted
node immediately precedes the Range in the container. The test
verifies this and other cases.

R=yosin@chromium.org,ojan@chromium.org
BUG=299993

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

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