add support for Scala maps

Maps are translated to javascript objects. The higher-order functions
`foreach`, `mapValues` and `filter` are encoded using the `Object.keys`
method the `forEach` iterator on arrays