First attempt at implementing an Allocation pool

Now we just need to work out what to do in the three callbacks
depends on #951
Number of elements.