ZOOKEEPER-1979. Fix Performance Warnings found by Findbugs 2.0.3 (Hongchao Deng via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1612457 13f79535-47bb-0310-9956-ffa450edef68
ZOOKEEPER-1981. Fix Dodgy Code Warnings identified by findbugs 2.0.3 (Hongchao Deng via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1612458 13f79535-47bb-0310-9956-ffa450edef68
fix concurrent atomic
zk-1907:improve thread