Some fixes and cleanup in Javascript generator.

- v8 generator uses the correct mangled name for class templates
- removed symbols for template variables in favor of using the string
  literals directly, as it is easier to understand when debugging.