added timeout support for zoo_cmd()