Make sure all documents are saved if the user asked us to quit the app.