Intercept window closing

Add a validate_close declarative member to the window to allow the user to intercept a window closing event (Issue #64). The user must provide a function taking a single argument which is a Window object and return a bool to either accept or refuse to close the window, by default a lambda returning True is provided. I implemented the behavior in both Qt and Wx but I tested it only on Qt. I also added a minimal example.