Add a "rounddown_pow_of_two" routine to log2.h