Support for pairs

Pairs are a bit different, because their unordered pairs depends on
whether the first elements are equal.
Shortcircuit pair equality

If the first elements are unequal, then we don't even need to look at
the second elements.
Instances for List

Builds on pairs.