glade: Fix a critical warning when opening a project with a .ui file opened
document-manager: Close all documents when closing a project

And ask if the documents need to be saved before closing them.
One reason to do this is to close all glade documents to avoid a warning when
the glade plugin is removed.