Fixed "unsaved changes" message

Fixes #1400
Added unsaved warning when closing tab / navigating away
Close editor when the user navigates away

(Quick) Fixes #1403
Merge pull request #1467 from owncloud/texteditor-unsavedconfirmation

Fixed "unsaved changes" message