Break out the rendering into a timer-based event, rather than as part
of the main loop.
The rendering is still done in the main loop, but it's done as a response
to a posted timer event.
This removes the whole "just keep running and chewing CPU" hack that
was going on before.