Replace non-deterministic worker-reload-repeated

Layout test worker-reload-repeated.html is non-deterministic because the
reload of the page is not synchronised with the behaviour of the
WebSocket in any way. It also takes a very variable amount of time and
times out a lot.

Replace it with three deterministic tests. The first two use a message
from the Worker back to the page to indicate when it is time to reload.

worker-open-reload-repeated.html reloads the page after the WebSocket
has signalled it is open.

worker-stall-reload-repeated.html reloads the page after connecting the
WebSocket. It uses a WebSocket handler which always stalls the handshake
to ensure that the handshake never completes before the page reloads.

The number of iterations has been reduced from 100 to 10 to minimise the
risk of timeouts.

worker-shutdown-race.html is a test to specifically reproduce
crbug.com/341754. It busy-waits on the main loop to give the Worker
time to start up and post the task to initialise the WebSocket, then
reloads the page to shutdown the Worker.

crrev.com/376843002 is a patch to crash when the race between WebSocket
initialisation and Worker shutdown is hit. It is useful in testing
worker-shutdown-race.html.

BUG=347416
TEST=layout tests

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

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