Generalize replace-ps to replace-nodes-with-edges

I have plans to use this function to replace q nodes as well, and
replace-ps was already general enough to do this. I just updated
the naming to reflect the new use.
Remove measures as a parameter for count-and-mark-crossings

Sorting by measure during cross counting was kind of silly, since
we already have a sorted collection that contains the nodes we need.
Also, doing this allows me to more easily pull cross counting out
of the ordering flow.