Fix performance issues on certain legacy graphics hardware that isn't capable of copying an integer.

This reverts commit 52dacaa3e3ca5cfd6ca0e524a5e5e3ff843cba02.
Revert "Fix performance issues on certain legacy graphics hardware that isn't capable of copying an integer."

This reverts commit 380f22ca0eeab998d4c73cb3a4116bd98d62e1ea.

Yeah, reverting a revert.
shader cache based by git revision
Split VideoBackend::Cleanup from Shutdown.

First is called from ogl/d3d thread, second is called from emulation thread (x11...)
make samplercache global and call constructor/destructor
remove flag GL_SYNC_FLUSH_COMMANDS_BIT on syncing
workaround for base vertex. damn old nvidia driver
cleanup ogl extension osd