Check if we can quit the app immediately.
If we have unsaved changes and can't, confirm interactivelly by presenting a dialog.
true if we can quit the app, false otherwise.