When implementing EC, we need to allocate blocks to containers on EC pipelines as well as Ratis pipelines (the current code path). The class `BlockManager.allocateBlock(...)` currently does this work.
To allow EC implementation to progress more smoothly, I would like to have BlockManager user a new interface to obtain a container for a block, namely the WritableContainerProvider interface.
This change is just a refactor to add the interface. Existing functionality is unchanged.