Generalize Pipelines to Workflows.

I’ve tried to make this PR as small as possible – containing only the changes necessary for the Workflow conversion. It’s still pretty big.
We need the mra.scala annotations to figure out exactly what to do here, but right now, any many-to-one function will have to be compiled to a reduction in an m/r job -- it will be a top-level reduction, or it might be grouped. Is there logic that handles this right now? I can't see how these aggregation cases would be handled correctly.