Speed optimizations in encodeHash() and hashLengthToCoverBoundingBox()

Hi!

I've merged bramp's speed optimization to encodeHash() and I've replaced hashLengthToCoverBoundingBox(). The latter is now 100 times faster (and creates fewer objects). What I did is just to mimc encodeHash algorithm until the point the results would differ counting the number of bits. I then return that number / 5 (rounding down).

All tests pass and I've also created a small program comparing the results between the old hashLengthToCoverBoundingBox and the new, using random values. No differences after 400,000 samples.

Thanks!