Add common hash algorithms implementations (djb2 and sdbm)

Use them in hash tests
Fix some tests for *_keys and *_values functions