Extend JS configuration utilities

Uses a writer type class, rather than converting `(v: Any).toString`, giving compile errors on unsupported types.

`JS` is a wrapper around a value, which can write the value to javascript.

More types supported by default. Strings are escaped. Raw javascript is supported explicitly via a `JavaScript` class.