ZOOKEEPER-4810: Fix buf data race at format_endpoint_info
ZOOKEEPER-4810: Fix buf data race at format_endpoint_info()
format_endpoint_info() is widely called in the IO thread. And the
some ZOOAPIs will call this method too: zoo_cycle_next_server()
and zoo_get_current_server(). These APIs return the same static buffer
read/write by IO thread causes data race.
Reviewers: kezhuw
Author: fanyang89
Closes #2140 from fanyang89/fix-c-client-format-endpoint-race