Fix reference count error

CListener needs to use enable_shared_from_this and shared_from_this

Otherwise the reference count could hit zero, and the object be freed, while the smart pointer is still in scope.