[FIXED JENKINS-21720] Improved config confirmation.

Ask for confirmation when navigating away from node, global,
security, view and log configuration after changes.

Don't require confirmation when pressing keys without changing
(e.g. pressing Tab for navigation) and when pressing Advanced
buttons.

Don't require confirmation when submitting the form.

---

PR notes:
* This replaces PR #1156
* Timeout is needed to prevent job config page from triggering the 'needs confirmation' state immediately (don't know which element). Even when trying, I haven't been able to get a config change in early enough to not trigger the condition.
* Did not indent script deliberately for cleaner diff
* Tested on OS X Firefox 28 and Safari 7
* PR considered finished despite the added TODO, as implementing that seems to be a lot of effort for very little gain.