Added dirty editor tracking and a warning before user leaves the page with unsaved changes

Not sure if you're accepting pull requests yet (or ever).  I've implemented a basic dirty indicator to the editor, and a warning prompt if the user attempts to leave the page with unsaved changed.  Only testing on Mac version of Chrome, Safari and Firefox.