correctly close all zmq stuff when mom receives term signal