Fix poor hashing method, multiplying by the same prime number results in
large number of hash collisions with linear distribution.
Also removes unnecessary object allocation, and simplifies logic to 1
step.
Merge pull request #1 from Sleaker/master

Fix int/long hashing.