handle MapReduceTask in JSExecutor

And cleaned up the MapReduce case class somewhat.

Only `map` an `reduce` functions, plus the `out` ADT, are currently
implemented, for execution and for emitting JS.