Allow passing block to code and demo

This will get passed the resulting app so you can do things like wire up
additional closing commands on an app without having to modify it's
source directly.
Variable rename
Keep Ctrl+w as default quit key on demo code
Merge pull request #15 from PragTob/code_and_demo_hook

Allow passing block to code and demo