[mod_event_socket] Check if listener is running before pushing more logs or events to its queue
This fixes a possibility for MAX_MISSED to be exceeded if more logs are
attempted to be pushed to the listener's queue after running kill_listener but
before the listener thread gets CPU time and removes itself.
On a heavily loaded system with a lot of logs in the event dispatch queue
these excessive logs may prove fatal since socket_logger itself will produce
logs about the full queue, resulting in a circular situation of never-ending logs.
The same logic was applied to event_handler after finding the same behaviour
mentioned in signalwire/freeswitch#2143.