WebSocket readyState should be CLOSED in onerror.

The readyState of a WebSocket instance must become CLOSED before the
error event fires.

BUG=340159
R=ricea@chromium.org, tyoshino@chromium.org

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

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