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.
Merge pull request #954 from steventlamb/topic/prompt_when_changing_modes

Add exit prompt when leaving unsaved changes