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 v1.2.1 in 24 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Test
passed python2 #36796

00:00:20

passed python3 #36797

00:00:24