DEBUG: pools: add extra sanity checks when picking objects from a local cache

These few checks are added to make sure we never try to pick an object from
an empty list, which would have a devastating effect.

(cherry picked from commit e2830addda9baf42c682d7c1856a53e2875deea4)
[wt: adjusted context]
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit ebeb66645ec529285d63c64773d2bc74ca7f4a58)
[wt: minor ctx adjust]
Signed-off-by: Willy Tarreau <w@1wt.eu>
2 files changed