split the client into a separate library

still a dep on libzpipes due to tests using a self-hosted broker