=str  #16109: Replace ScalaGraph with custom graph impl

Minimalistic replacement for ScalaGraph. Not speed optimized so far, and it only provides a mutable representation (builder) yet.

If immutability is required it can be implemented, will take a little time. I can do it in this PR or we can open a ticket.

As for speed optimizations, if we get rid of the remove operation (we only use it to fuse graphs together) then we keep the following invariants:
 - all connected components remain connected, but they might get connected together
 - all cycles remain cylces

So we will be able to do inremental calculation of these which can be very fast with appropriate data structures.

**No unit tests yet, TBD**
Maybe make it configurable so if someone tries to add a duplicate edge label then it throws instead of removing the old one.