fix for event lag

* moves glfwPollEvents to top of App loop, and sleep logic to after display update, so that UI events can be processed immediately
Merge pull request #3226 from tgfrerer/test-pollevents-snappyness

possible fix for event lag