[JENKINS-19835] added page-leave confirmation on the configuration page
avoid global namespace pollution
simplified using Prototype.js
if applied, the data is saved so flag should be reset.

Technically we should doing so only after the server reported success, but unfortunately there's no good hook for that.
[FIXED JENKINS-19835]

Merged pull request #962.