Add onbeforeunload handler when navigating away from unsubmitted changes

Change-Id: I451437da738e57866b1013de3c659102da62a15d
Merge "Add onbeforeunload handler when navigating away from unsubmitted changes"