Make gameloop simpler, and fix #194

Pushed all the logic away from the rendering code into the update while condition, and a wait condition afterwards. Utilizes sleep for waiting instead of burning cpu cycles, at the cost of accuracy (accuracy could be re-introduced with a while loop below it if there is a good reason to). Fixes #194 by only updating to the update before catching up/passing next_render.
Fix sleep overflow bug
Merge pull request #195 from gmorenz/simplify-gameloop

Make gameloop simpler, and fix #194