SDL: add SDL2 support to sdl-events

Most of the incompibility caused by the renaming of
some types and defines is handled by
backends/platform/sdl/sdl-sys.h, but the biggest
remaining change here is due to that mapKey was
making assumptions about the ordering of the SDLK_xxx
defines.
The order have changed in SDL2, so the problem is solved
by first transforming the SDLK_xxx code to a COMMON::KEYCODE_xxx
and then do the mapping from that.

Another big change in SDL2 is the removal of the unicode
field in the SDL_KEYDOWN events.
Unicode data is now provided by the SDL_TEXTINPUT event
instead.
To merge the SDL_TEXTINPUT event that follows the SDL_KEYDOWN
event, the event queue is peeked into for an SDL_TEXTINPUT event
on each SDL_KEYDOWN event.
The SDL_TEXTINPUT event is never issued after SDL_KEYUP events,
so on the surface it would seem that there would be a difference
in behaviour from the SDL1 code.
However, SDL1 do not set the unicode field on SDL_KEYUP events,
so the behaviour is equivalent to that.

A couple of minor changes due to changes in the VIDEO events
and SDL_WM_xxx functions are also present.