Optimised event loop

Instead of generating on each keypress, it sets a flag and generates
after all events polled.
Merge branch 'master' of github.com:YeyaSwizaw/sfml-mazegen