Prevent entry order changing Hash#hash value

The previous implementation of the Hash#hash method was affected by the
order that the key/value pairs were returned from the internal trie's
each method. This meant that two Hashes that appeared identical could
fail an equality check because their hash values could be different.

Sorting the keys before building up the hash value is a simple (and
obvious) way to correct this. There is likely a more efficient or clever
solution to this problem, but in the meantime this patch at least fixes 
the bug I have been running into.