Display a waiting dialog before exiting (fix #394)

A nice dialog is displayed to the user in order to inform him that some tasks
are before exit (saving session, pushing to remote git repository).