Adding handshake
Hi there,

Ratchet had been working perfectly for me in the past. Gave it a shot again, but I noticed that the ws wasn't connecting. Apparently some browsers now require a handshake. This is important for the ws to get the connected state.

Below is quick but tested handshake code. I suggest to add a better version of this into the core of Ratchet:

```php
    public function onMessage(ConnectionInterface $connection, $message)
    {
        $client = $connection->client;

        if (true !== $connection->httpHeadersReceived) {
            try {
                if (null === ($request = $this->_reqParser->onMessage($connection, $message))) {
                    return;
                }
            } catch (\OverflowException $oe) {
                return $this->close($connection, 413);
            }
        }

        $connection->httpHeadersReceived = true;

        $this->handshake(
            $request,
            $connection
        );

        $client->onMessage($connection, $message);
    }

    private function handshake(
        RequestInterface $request,
        ConnectionInterface $connection
    ) {
        $key = $request->getHeader('sec-websocket-key')[0] ?? null;
        $version = (int) $request->getHeader('sec-websocket-version')[0] ?? null;
        $upgrade = $request->getHeader('upgrade')[0] ?? null;

        if (
            $request->getMethod() !== 'GET'
            || \strtolower($upgrade) !== self::WS
            || ! $key
            || ! preg_match(self::KEY_REGEX, $key)
            || ($version !== 8 && $version !== 13)
        ) {
            return $this->abortHandshake($connection, 400);
        }

        $digest = base64_encode(pack('H*', sha1($key . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11')));
        $headers = [
            'Upgrade' => 'websocket',
            'Connection' => 'Upgrade',
            'Sec-WebSocket-Accept' => $digest
        ];

        $message = Http::STATUS_CODES[101];
        $data = "HTTP/1.1 101 {$message}";
        foreach ($headers as $h => $header) {
            $data .= "\r\n{$h}: {$header}";
        }
        $data .= "\r\n\r\n";

        $connection->send($data);
    }

    private function abortHandshake(
        ConnectionInterface $connection,
        int $code,
        ?string $message = null,
        array $headers = []
    ) {
        $message = $message ?? Http::STATUS_CODES[400];
        $headers = \array_merge(
            [
                'Connection' => 'close',
                'Content-Type' => 'text/html',
                'Content-Length' => strlen($message)
            ],
            $headers
        );

        $data = "HTTP/1.1 400 {$message}";
        foreach ($headers as $h => $header) {
            $data .= "\r\n{$h}: {$header}";
        }
        $data .= "\r\n";

        $connection->send($data);
        $connection->close();
    }
```

This code sets the right 101 headers with the right Accept header. It does not account for any secure server connection whatsoever. The implementation example I used is from: https://github.com/bloatless/php-websocket/blob/3a1cecc8ddfeeb86eda9a08ddd10b413009ac48c/src/Connection.php#L79