Invert control flow, fix resizing, improve checkerboarding significantly, and add a refresh driver

r? @glennw @mbrubeck
On Windows in particular, the OS sleep is often +/- 10ms, sometimes more, which seems like it would cause issues implementing the refresh driver this way? Do you think it's feasible to drive it directly from vsync?