Add a C implementation of leading_bit and clz to optimize Patricia tree