Added __hash__() functions for classes w/__eq__.

In python 3.x, classes that override __eq__ but not __hash__ become
unhashable and un-sortable.