Fix for retaining large slab buffers in node core
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.
Merge pull request #176 from 3rd-Eden/master

Emit the close event before destroying the internal _socket
Merge pull request #153 from jmatthewsr-ms/master

Fix for slab buffer retention, leading to large memory consumption
sync to ws upstream