Move nearest_pow_two_exp() from mempool.c to math.c.
Rename functions.
Import math and logger in mempool API.