Change around some of the function key shortcuts.
Make savestating and recording play nicely.

Additionally, single-frame stepping continue to play nicely with both.
Don't write spurious keypresses.
Handle savestate saving/loading immediately.
Actually fix savestates.

The problem was cache invalidation! The next, better fix will be to persist
the cache to the savestate.
Never overwrite old savestates.

Instead, use a new mechanism where every savestate is persisted.