Implement {max,min}_hash_length

This is useful for determining the amount of space you need to store
hashes which is necessary if you interact with databases somehow.