improved pool operations:
added upper limitation feature for allocating new items,
some minor refactoring, new unit-tests