enable screen rotation through environment variable AUTO_ORIENTATION

Hello (again!),

This patch lets a program respond to rotation events by setting the environment variable AUTO_ORIENTATION. When the display rotates the program will get a SDL_VIDEORESIZE event in their main event loop with the new dimensions, and they can call SDL_SetVideoMode() to get a new screen surface to draw to.

I haven't tested this with OpenGL windows, nor have I tested with the environment variables WIDTH, HEIGHT or STRETCH_MODE set. I imagine that if a program has a specific height, width and stretch mode specified then they probably don't want auto rotation anyway. But in the case where the program just wants full screen windows in whatever orientation the user is holding at, then it seems to do the trick.