rebase jitv branch too
Merge branch 'master' into jitv
Merge branch 'master' into jitv
Merge branch 'master' into jitv
Merge branch 'master' into jitv

Conflicts:
	engine/rendergl.cpp
fix vsync command line parsing
Merge branch 'master' into jitv

Conflicts:
	engine/rendergl.cpp
Do not try to halt the gfx if vsync == 0
respect menufps, force vsync 1 in mainmenu, do not run unbounded if minimized
if vsync == 0 and in game, busy poll for new jobs in the drawer thread
do not do busy polling in drawer thread if the gl context is not acquired
do not use menufps, rely on vsync
draw fps at the right place with vsync 0
use SDL_GetTicks to fps limit load screens
make vsync = 0 use the main thread for drawing
backport fix from sdl hg to get screen refresh rate on osx
use 2ms by default for jitvanticipate