Add historyEventDelay option
[javascript mode] Correct indentation for nested, brace-less if/else statements

Closes #1436