Refactor CSimpleFileCache::WaitData, kill race condition.