Changes on the sample-framework

Here are some changes I did on the sample framework. Feel free to cherry pick changes in case a commit doesn't look right.
Before the refactoring, some keys were processed on every frame. With the sample-framework all the keys are handled in the event handler, which is called roughly every 10th frame on my system when a key is pressed. This is why the rate of change is slower (for example the `weight` parameter in the knight sample). The patch doesn't revert to the old implementation, but separates the events from the continuos processing. I also removes the need for the member variable for the key state. Please test on other platform; this was only tested on mac.
I have some own samples where I need to change the farDist, therefore there is a patch related to that.