register global window close handler to ask for confirmation when navigating away
SWC-957: warn on navigating away from Synapse, as well as if the place changes and we know that we are in edit mode in some Activity
from code review
Merge pull request #620 from jay-hodgson/SWC-957

Swc 957: warn on navigating away from Synapse (or within Synapse if editing)