Initial migration to SDL2

Leaving i_video.c to last, since that's where the main code changes are.