Finish SDL2 port on linux; solve some valgrind errors in cleanup.