Restore emitted events after socket.destroy

Internally `socket.destroy` emits an `error` event, but as `socket.emit` is being proxied and never restored, the listeners of `error` event will never get a chance to handle it.