WebSocket implements IAsyncDisposable. When disposing websocket because of TaskSource cancellation, do so async and complete the WS close handshake if we can. If we receive a ConnectionClosedPrematurely message, only actually disconnect + dispose if the connection is no longer open. Call TaskSource.OnSessionEnded in GameMenuDll when resetting environment.