Fixes setup and teardown bugs in testing

 - bugs introduced due to too many simultaneous thrift connections
 - added a close connection method to HbaseWrapper class