Fix saveslot selection for SDL2

The IDs for SDL scancodes don't start from SDL_SCANCODE_0 and end at
SDL_SCANCODE_9. Therefore, SDL_SCANCODE_9 is bigger than SDL_SCANCODE_0 (which
violates a precondition of the key check) and this makes it impossible to
select a saveslot using the numbers on the keyboard.

Using a special (order independent) function which translates to the slot ids
avoids this problem and can still be optimized to a simple range check +
calculation by the compiler.