Improve PolynomialSequence.connection_graph()
Simplify the code; also, the previous code has to iterate over variables
of the sequence twice (this is really bad before #35510)
Moreover, now we add a clique between the variables of each polynomial,
so it agrees with the description (the code before used to add just a
spanning tree of the clique -- a star).
This makes this method a little bit slower for the purposes of
`connected_components()` (for which adding a star is equivalent).
However, #35518 will rewrite `connected_components()` without using
`connection_graph()` so this is not really a problem.