Emit the close event before destroying the internal _socket

This way we can still read out the bytesRead and bytesSend from the socket when it
closes the connections. This can be useful for metrics collection etc.