test: order by name instead of ID (#5576)
When ordering by the CUID, the odering produced by the query engine
doesn't really make sense. We get the child before the parent for a
monotonically increasing ID - it should be the other way around (the
parent needs to exist first in order not to have a broken foreign key on
the child). We consistently see the expected ordering with the query
compiler.
I didn't attempt to change the QE behavior here, because I don't think
it's worth it, I just updated the test to sort by name instead of id,
because I don't think it matters for this test.