fix the order of operations to avoid multiple connection attemps

primarily, if STOP_RUNNING is in the queue, don't try to connect
ping host when queue is empty again
no longer needed
when a command set times out, start a new worker thread