Return the default value from getJSToNativeConversionTemplate, to allow reusing it more easily.

This commit does not change the generated code.
Rewrite the dictionary codegen to use pattern matching rather than is_some/unwrap.
Support dictionary members without default values.