merge Joe's hashing fixes

Notably, this fixes the hash equality between tinyarrays and tuples on
64 bit Windows where long is only 32 bit.  The changes shouldn't have
any observable effect (other than a minor speedup) on Unix.
2 jobs for master in 23 seconds
latest