Basic support for key configuration and gamepads

This basically translates SDL input events to a simple abstract representation, so game logic can just ask "in which direction is the player going?" or "is he pressing the Any button now?"

I've modified the menu code for an example. Works fine with keyboard controls. Gamepad buttons work, but I've screwed something up with axes, so no D-pad yet.