Add exit prompt when leaving unsaved changes

When leaving certain data entry modes, including but not limited to 'Add Tree' and 'Edit Tree', you can now lock the page so that the user will be prompted before leaving the page, or before leaving that particular edit mode.