Instead of shallow-copying va-surface-based memories, it allows them to be shareable.
Implements pooled allocators either for GstVaAllocator and GstVaDmabufAllocator. This are based on a GstAtomicQueue where are pushed the disposed memories (instead of free them). Later, when GstVaPool calls acquire_buffer() it either allocate a new buffer or reuse a disposed memory in the queue.
When reset_buffer() in GstVaPool the memories in buffer are removed (and disposed) so, basically, release_buffer() treats only with emptied buffers.
start() in GstVaPool is nulled to avoid the removal of pre-allocated buffers, but also they aren't pre-allocated anymore, but on demand only.
So for, in my tests, H264 decoding works, but VP8 decode doesn't. AFAIU, allocators might need cond/wait between disposing and reusing memories or, we have to reallocate the buffes in bufferqueue start()