Double file cache fix. Fixes ticket #15500

Double caching for e.g. dvdplayer has been broken for a long time. The actual problem for double cache was that when the cache was full, we still kept reading from the source which get disposed due to seek-requests which in turn also caused seek backs in the stream (which are really slow on e.g. http). This revealed itself while playing mp4 files with high a/v offset but generally this should improve performance (especially on slow systems) for all cached files. Furthmore we would block in WaitForData() when seeking just "over" the cache while it was full.

Would be great if this could be included for Helix.
it's wrong if not Reset m_writePos, e.g. when seek between offset 200k and 10M, and together with reading and write forward at the same time and switch between each other.
it will cause average thought it write 10M-200k bytes in one round, and thought it write 200k-10M bytes in the other round, but we did not. so it's wrong to not Reset the average.