Add _gedit_document_needs_saving

Use the new function in place of the previously used helper function
document_needs_saving in gedit/gedit-commands-file.c and similar code
in gedit/gedit-tab.c.

Notice: document_needs_saving didn't check if the doc had been
externally modified, which _gedit_document_needs_saving now does.

_gedit_document_needs_saving does not check remote files for external
modification or deletion. The code it replaces didn't do that either.

https://bugzilla.gnome.org/show_bug.cgi?id=379778
FileSaveAll: Only save modified documents

_gedit_cmd_file_save_documents_list: Move the check if saving is
needed, so it applies to all documents, not just untitled and readonly
ones.

https://bugzilla.gnome.org/show_bug.cgi?id=379778