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.
No, you’re right – the JS phase just handles generating a valid JS expression, and has no knowledge of that. In this PR, JS expressions are just used when generating the map/reduce for the join. There is another PR coming that handles generating `$where` selectors when necessary, which triggers creation of map/reduce jobs (rather than pipelines) in `WorkflowOp.crush`. We’ll need additional logic (in the Selector phase, to not generate a `$where` for many->one functions, and in the WorkflowPhase to generate a `MapReduceOp`) for this case, but that hasn’t been done yet.