Fix strict aliasing breakage in hash functions

For now, we're getting around the problem using GCC's `__may_alias__`
attribute, which turns off strict aliasing checks (and optimizations)
for a single type.  We might eventually need to find a more robust
solution.