buffer: add support for pools using caller data in allocation