rename buffer pool to PoolAllocator

The main motivation behind this change is to get rid of a few ifs.
Fixes issue #25