fix off-by-one in pool limits
fix test
fix missing callback when no waiting client dequeued