Fix CSimpleFileCache::WaitData, remove wrong code and correct the logic.

by review cache code, I found a little place need be fixed:

in the CSimpleFileCache::WaitData the comment and the code of wait available event is not matched, and the return code is also wrong.
in the CSimpleFileCache::WriteToCache set the available event before set correct write position, the logic is not correct. these two related place is now fixed here.