Fix __hash__ in functools.cmp_to_key() to work with collections.Hashable.