Fix int/long hashing.

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 by removing unnecessary float value additions.