Implement lookupOrd and rewrite lookupGT.

Write lookupOrd as a general function in terms of which we can
rewrite lookupGT, lookupGE, lookupLT and lookupLE.
Implement lookupGE.
Implement lookupLT.
Implement lookupLE.