Implementation of onEventIf, a version of onEvent guarded by confirm().

H/t for this little innovation actually belongs to @shadowfiend. I'm
just taking credit for bringing it into the latest version of Lift. ;)
Null testing for headers. Closes #1452
Closes #1455. Finer grained sync