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 and the `forEach` iterator on arrays.