FT-271 Move block allocator code into a class.