dep-resolv: Improve code clarity and tests coverage for rc-ordering.
I left off changing the expected objects in sort-build-order.t due to time, but this should address the remaining (and very constructive) comments.