We used to assert that the merged protocol set was larger than or
equal to in size to both the left hand side and the right hand
side.
However, there is a counter-example:
protocol P {}
protocol Q {}
protocol R : P, Q {}
LHS = [P&Q:T], RHS = [R:T]
The merged atom is `[R:T]` which has fewer protocols than the
left hand side.
If you have a same-type requirement like 'Self.Foo == Self' inside a
protocol P, we add a rewrite rule:
[P].Foo => [P]
Simplification turns this into
[P:Foo] => [P]
Previously, the order was backwards so we would end up with
[P] => [P:Foo]
Which would mess up the conformance information in the equivalence class map.
The `if (other.size() > size())` check was bogus; we can still have an
overlap of the second kind if the other term is longer than this term.
Remove this check, and rewrite the algorithm to be clearer in general.
Also move a all headers other than RequirementMachine.h there, since
I don't expect they will be used outside of the rewrite system
implementation itself.