Free keys and values in hash tables

You can now provide two optional callbacks (`free_key` and `free_value`)
that will cause your hash table to take ownership of the keys and values
that it contains.  The keys and/or values will be automatically freed
(using the provided callbacks) when entries are deleted, and when the
hash table itself is destroyed.
Explicit hash values

This patch adds new `_hash` variants for each of the functions for
interacting with hash tables.  These new variants let you provide a hash
value explicitly, as an extra function parameter, instead of making the
hash table call its `hash` callback to generate the hash value.  This
can be useful if you've already calculated and cached the hash value
somewhere.