Game loop and initialization stuff

Implemented game loop in a separate thread from the Windows message
pump, and initialized the rendering and input systems.