[javascript mode] Add doubleIndentSwitch option

Default is still true.

Closes #1592