Rasterizer: Remove VirtualDub dependency to detect SSE2.
MainFrm: Don't overwrite last window position when window is not visible.

Fixes #4561
Use c++11 random number generators.

In our case it doesn't matter that much, but why not?
CSubPicQueueNoThread: Respect invalidation time.
Do not clear surface cache when max texture size has not been changed.

We were removing valid surfaces from the cache for PGS/DVB subtitles.
Basically surface cache was broken.
SubPic queue: Clear queue only when it's needed.

Time can decrease even within the same video frame and
it make no sense to purge whole queue, if we still can reuse buffered
subpic.