Generalize handling of merged TypedPipes

This flattens merges all the way out into a List, then checks for duplicates in that list. If they exist, do a local self merge leaving us with only distinct pipes, which cascading can handle.
right now, we just make an identity pipe `(new Pipe(newName, previous))` with a new unique (just integer increment now) name, but only if there is more than one pipe going into the merge.

I'm not totally clear what I should add. Suggestions?