BUG : add __hash__ to AffineBase

python3 requires that if a class defines `__eq__` then in must define
`__hash__` (so that if a == b then hash(a) == hash(b)).  Define 64bit
hash by pulling the first 8 characters out of a sha1 hash of the matrix

closes #2828