split into multiple files
rewrite out api as a libev watcher
remove czmq-style code files