Win32 message loop optimization

Let the thread sleep at each frame's idle time. It can save a lot of CPU cost when the application is minimized or running a simple scene.
Merge pull request #3 from lixianlin/win32_message_loop_optimization

Win32 message loop optimization