Change bmalloc to support more space efficient allocation of memory,
especially for small allocations of memory.
Small code tidyups, ready to go.