ConsistentHash algorithm for Scala