Add hamming distance function and tests

Implementation of [Hamming distance](https://en.wikipedia.org/wiki/Hamming_distance), a simple string distance measure, that I wanted to contribute to the project.