Correctly compare relations with shared origin.

The previous implementation did not handle comparing relation sets that shared one endpoint, but not the other. If either endpoint was shared, the comparison function returned true, that the relations were the same. Now it will check to make sure that both endpoints, instead of just one, are shared.
s/An set/A set/
It would be great to add an example of what an endpoint objects set looks like, so that the code is easier to follow.
Also, isn't this an {Array} now?