Dynamic window resize take 2

The #9600 PR became unmergeable, so I cleaned it up and remade it.

This adds drag-resize functionality to the main game window. Options screen now lists Window Width and Window Height in pixels for SDL builds, has a setting to automatically save window size after drag-resizing to the config, and doesn't require a restart for window size changes to take effect.

There are still some issues with redraw after the window resize, and the function doesn't yet work in the curses build.
The code as it is gives no indication of why this variable is here or what it means.  You can almost certainly be switching on a check for the actual functionality you need instead of adding this state variable.