Modify GC scheduling and reduce VFS cache size.

It seems like there is a memory leak if we haven't finished with the marking phase of an incremental GC and SpiderMonkey has to trigger a full GC because it runs out of memory. With this patch we stop trying to make incremental GCs if we are above 1/2 of the runtime size and do Full GCs instead. This should make such low memory conditions even less likely than they were already after the previous patch. Also reduce the maximum VFS cache size to 400 MB.
Refs #2808


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15831 3db68df2-c116-0410-a063-a993310a9797
Fixes blank window after maximizing, minimizing, then restoring the game on Windows. In SDL2, this is an SDL_WINDOWEVENT_EXPOSED event, which we must handle to reset the game's minimized state. Refs #2041

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15832 3db68df2-c116-0410-a063-a993310a9797
Automated build.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15833 3db68df2-c116-0410-a063-a993310a9797
Fixes #2831. Patch by prodigalson.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15834 3db68df2-c116-0410-a063-a993310a9797
Slightly buffs swordsmen and fixes a couple inconsistencies.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15835 3db68df2-c116-0410-a063-a993310a9797
improve gui performance, refs #2179 comment 21

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15836 3db68df2-c116-0410-a063-a993310a9797
Fixes cavalry upgrade inconsistencies.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15837 3db68df2-c116-0410-a063-a993310a9797
Fixes tests broken in r15836.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15838 3db68df2-c116-0410-a063-a993310a9797
Merge 'remotes/trunk'