refactor socket valid code in zmq_utils; simplifying connectors based on...

... client and server codes; added more tests for zmq utils; added a barrier to async worker so it waits for the handler to complete before it gets destroyed