SI-8755 Phase Assembly is broken

- Fixes various bugs in the phase assembly of the Scala compiler (see below and JIRA ticket)
- Plugins with empty after and rightAfter constraints are no longer ignored
- runsRightAfter no longer causes other constraints to be ignored
- constraint systems are now accepted iff they are solvable
- No more illegal modifications of objects contained in hash sets (hash code no longer dependent on field values, identity semantics sufficient)
- Realized constraint solving by well-known topological sort algorithm (due to Kahn (1962))
- Fixes #8755
- backport to 2.11.x