Initial dump of the node socket implementation.
It inherits from a base class natively provided by node, so
the internals will need to change quite a bit.  The interface will
ideally remain the same.