SDL: add support for SDL2

As the title says, this set of patches adds initial support for SDL2.
The commit messages for each patch should contain an explanation to deficiencies
in the related areas, but one thing that is not mentioned is that this does not contain support
for explicitly using OpenGL (although it might be the actual backend SDL2 is using to render).

Also, some of the changes might be considered a bit of hacks (the compatibility defines for an instance),
so I'm certainly up for discussion on how to improve on cleanliness.

I've tested the changes on a normal Linux machine, and as far as my tests goes, the changes are
at a state where they are usable (albeit experimental).
My suggestion is to just not redefine the macro. Come up with a different
name instead. And, personally, I'd rather see it as an inline function that
a macro.