Added an option in the Dialog class to give it a function to run when it's closed by other ways than by its buttons. Its default value is the "cancel" callback if given, or none. Before this commit, there was no way to add any callback to run when the modal wasn't closed by a button. Now, when exiting the modal by other means (e.g.: "Escape" key), it will run a given callback.