lua consistent hash module written in c