Add support for hashing Unicode data by using Buffers

Previously, all hashing algorithms were converting string data to
binary using a naive approach that did not support non-ASCII input.
This change converts input into a Buffer which properly handles
Unicode data. This change also fixes the interface on createHash
and createHmac to properly return a Buffer object by default, which
the Node.js API does.

* Updated tests to ensure that hash functions work with Unicode
* createHash()/createHmac() now returns a Buffer to match Node.js API
* Refactored index.js and hash implementations to reduce duplication