Switch to vertical layout automatically as the window is being resized

Prevents ending up in the wrong layout on startup and being unable to fix it
without restarting the emulator.
Prevent rendering and multiple WM_SIZE events when switching between windowed and fullscreen

May help #6295 but also it may not, I can't test it as I don't have that GPU.

Also gets rid of some outdated code.