Make Socket.prototype.destroy() re-entrance safe

so that we are free to call socket.destroy() in error event handler