JS backend: add support for reflection types
JS backend: support for reflection
JS backend: tests for reflection support
JS backend: reflection support: fixes after review