Working code generation for reduce and map-reduce.  Not pretty.

Also some test programs.