GFX: switch to 8-bit rendering.

We now keep palette indices through all the intermediate
steps, and only convert to real colors as a final step. This is
a preparation for shadow/highlight support.
GFX: separate tile and sprite drawing and mixing
VDP: fix off-by-one in vcounter
VDP: fix potential exit codepath without return value
Switch to SDL2 for faster graphic output.
GFX: fix a regression in H32 mode.
GFX: implement basic shadow/highlight mode
Disable optimizations on mem.cpp (workaround LLVM bug in release)
IOPORTS: fix uninitialized variable
Remove unused variables
Implement per-cartidget hardware.

Initial supporto for SSF2, Sonic3 backup RAM, and country codes
MEM: do not reinit YM2612 when Z80 reset line is asserted
MEM: implement ROM mirroring
Add GameGenie codes support
MEM: fix region detection
Update