Set WebSocket callbacks to null instead of deleting them, since deleting causes reconnect problems in Safari.