feat(socketio): notify client of transport completion
When the async client connects to the server, it spawns a new thread to handle the arriving messages asynchronously, which is immediately detached with no chance of awaiting its completion.
For long-running programs (e.g. a client program that never really disconnects from the server) this can be problematic, as unexpected stream completions would go unnoticed. This may happen if the underlying tungstenite websocket shuts down ('Received close frame: None') but there are no engineio/socketio close frames. Hence, since the stream terminates, the message handling task stops without a Close or Error event being fired.
Thus, we now fire an additional Event::Close when the stream terminates, to signal the (potentially unexpected) close to the user.
Closes #448
Once we settle on a final solution, I can also write a test for that.
Are there any remaining problems with this? This looks like it solves exactly what I need.