User prompted if leaving an unsaved page

The user is now prompted for confirmation if is leaving a page containing unsaved changes.

From an idea of Fabio Pardi, implemented by Jasper Visser