Start a single-shot timer when a websocket enters CLOSING and fail
the connection if the peer never answers with its close frame.
Without a bound here, a dropped or non-responsive peer can leave the
websocket stuck in the closing handshake forever, which is another
path to rare websocket timeouts during repeated test runs.
Route fatal protocol-level websocket failures through fail_connection(),
emit both error and close once a socket exists, and drop the old
fatal_error() helper.
This gives callers a terminal close event instead of leaving transport
failures as error-only state changes.
`curl_easy_recv` must be called in a loop until it returns EAGAIN,
because it may cache data, but only activate the read notifier once.
Additionally, the data received can contain multiple WebSocket frames
and only activate the notifier once, so we have to keep reading frames
until there isn't enough data.
We also have to do this immediately after connecting a WebSocket,
since the server may immediately send data when the WebSocket opens
and before we create the read notifier.
This makes Discord login faster and more reliable, and makes Discord
activities start loading.