Poison the memory when it enters the pool and unpoison it when it is
handed out again or freed. Only buffers with av_buffer_default_free are
touched, since custom pool allocators may not be compatible with it.
Also mark reused memory undefined, but only where the pool never
promised zeros.
RefStruct entries with an entry free callback own allocations while
they rest in the pool, such as the AVFrame behind an AVContainerFifo
slot. LeakSanitizer does not follow pointers stored in poisoned memory
and would report those allocations as leaked while the pool is alive,
so such entries stay addressable.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>