[PATCH 17/18] bitmap: Split bitmap helper functions into their own module