Clean up WebSocket object.