Empty _callback event listeners are removed

When a specific callback listener was removed from a socket, the event listener could contain no callbacks. This code checks if the listener array has any callbacks on it after the specific callback is remove, if it doesn't have any other callbacks the listener is removed .