Add cheat API support.

Easiest console yet; no bankswitching like GBC, nor ROM-dependent stuff like SNES, it's all static.
I'm not sure about the SRAM size; it seems messy, but should work somewhat. (adjust_save_ram seems to be called at wrong time; I don't know when it should be called, but I'm pretty sure the front doesn't set SRAM before retro_init.)

There are also some really weird SDL-related commits in here, and I have no idea how those six pull request confirmations got into my fork either. They should probably be merged too, but I really want to know where they came from...