Recreate the glfw window outside the key handler when switching to fullscreen mode

The window can't be deleted inside the event handler for the same window; this crashes sometimes on the mac.
Merge pull request #5 from jcmonnin/sample-framework

Recreate the glfw window outside the key handler when switching to fullscreen mode