Pull out WorkflowOp merging as a separate operator

This gives us another option for testing workflow construction, which should be helpful as things continue to get more complicated.
Why not just define `rewrite` as a function in `WorkflowOp` companion in the first place (rather than a method), then you can keep this nasty signature and get rid of the cast … right?