Fauxton: Before unload event

Build custom beforeunload event for backbone route,
also add in check on editor to warn the user if they
have unsaved changes in their editor.