Improve form changes detection

Original form data is compared to current data when exiting the page. The confirm dialog shows up only if the data has changed.