Move main loop from win32-main.cpp to main.cpp.