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.

I can't find any other way of solving this cleanly. Moving the `close` event has no side affects as far as I'm aware off.