Minor improvements in utils.py

In the hash functions in util.py, added a missing unit test and use *isinstance(s, unicode)* instead of *type(s) == type(unicode)*. This makes it more flexible. See e.g. http://stereochro.me/ideas/type-vs-isinstance for arguments why you should use isinstance.