Removed locking on every query and improved some race condition coverage for Thrift client pool.