added implementation of Hamming numbers (ported from scala)

Implements http://rosettacode.org/wiki/Hamming_numbers