a consistent_hash implementation in c++