Use proper order of operations in x < y check

First compare hashes. If they are equal, do __eq__(). Only if that returns
false, which will be very rare (i.e. if our hash is not high quality), only
then run the slowest __cmp__().