CURATOR-126: Fix race condition in CuratorFrameworkImpl.close()

I just checked - that's the only instance of it in the code. If you don't mind, please fix it as part of this PR.