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).
Alright, let's do that.