ACCUMULO-1858 Backport ZooKeeper clean up to 1.4 and 1.5.

Fix cherry picks two commits:

ACCUMULO-1379 - Adding close() to Instance to assist in freeing up resources

(cherry picked from commit 7da1164d87227960d3e0cfc841f753067e2c0304)

Reason: bugfix
Author: John Vines <jvines@gmail.com>

Differs from original by path changes and leaving out ConditionalWriterTest, which is only in 1.6.0+

----

ACCUMULO-1379 Fix edge cases if error in closing ZooKeeperInstance

(cherry picked from commit 3f6c66ede52cb1fb5a122d7bad06d7978ff0a671)

Reason: bugfix
Author: Christopher Tubbs <ctubbsii@apache.org>

Signed-off-by: Bill Slacum <ujustgotbilld@apache.org>
Merge remote-tracking branch 'apache-committers/1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

Conflicts:
	core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
	core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
	core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
	examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
	fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReader.java
	server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
Merge branch '1.5.1-SNAPSHOT' of https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT

Conflicts:
	examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
ACCUMULO-1858 Fixed compilation error from bad merge.

The old merge&push bit me as I was missing a '}'.
ACCUMULO-1833 Fix merge to 1.6.0 regarding TCredentials->Credentials
ACCUMULO-1892 redo resolving conflict resolution from 1.4 merge
ACCUMULO-1833 Account for race condition in test where mutations are flushed immediately.
Merge remote-tracking branch 'apache-committers/1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Did a merge for ACCUMULO-1858 and picked some "Elser" slack.

Conflicts:
	core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
	server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
Merge remote-tracking branch 'apache-committers/1.6.0-SNAPSHOT'