Move connected components into the library itself

Currently the comment overpromises a bit; we're that aware
yet, just aspiring to be
Merge connected components when node is also edge
Distinguish between wanted edges/nodes in copy

Though if we want an edge we always want the node that goes with
it. I'm not entirely sure why we want this distinction anymore,
but it does seem cleaner in any case
Fix bridging of connected components.

Work was initially done in non-split context.