FIX: crash recoding colour images multithreaded

git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@6683 8aca7d54-2c30-db11-9de9-000461428c89
Initial checkin of the sdl2 backend.

This creates a separate backend target except for some common cursor code.
It is based on work done in an earlier 'sdl2' branch, with help from
others on the Simutrans forum.
Switch to RGB565 pixel format.

With RGB555, there were green artifact pixels on slopes adjacent to water.
Use a separate Makefile stanza for sdl and sdl2, since they are in fact different enough.
Misc cleanups:

- Improve some casts
- Remove some dead code
- Remove the width alignment code unless it demonstrates itself to be necessary.
Add sdl2 backend to config.template
- Use SDL_EventState to filter out events (thanks TurfIt)
- Remove SDL_INIT_NOPARACHUTE unless it demonstrates itself to be necessary.
Fix sound stuckness in SDL2.
Fix fullscreen by using SDL_WINDOW_FULLSCREEN_DESKTOP mode.

This leaves the graphics card at its native resolution and uses
hardware acceleration to scale our texture from whatever size we have specified.
Properly handle key events with the control key pressed.
Treat command as a control key on a mac. (Matches sdl1.2 behavior.)