basesink: drain on allocation query
basesink: drain on allocation query

Allows buffers to be reclaimed when caps is to be renegotiated so
that bufferpools can be stopped. As the allocation query is
serialized all buffers have been already drained from the pipeline,
except this last_sample one.

https://bugzilla.gnome.org/show_bug.cgi?id=682770

jpxiong/gstreamer,centricular/gstreamer,shelsonjava/gstreamer,mparis/gstreamer,centricular/gstreamer,StreamUtils/gstreamer,centricular/gstreamer,StreamUtils/gstreamer,jpxiong/gstreamer,centricular/gstreamer,jpxiong/gstreamer,centricular/gstreamer,mparis/gstreamer,shelsonjava/gstreamer,mparis/gstreamer,krichter722/gstreamer,StreamUtils/gstreamer,krichter722/gstreamer,StreamUtils/gstreamer,jpxiong/gstreamer,krichter722/gstreamer,shelsonjava/gstreamer,shelsonjava/gstreamer,krichter722/gstreamer,mparis/gstreamer,shelsonjava/gstreamer,mparis/gstreamer,jpxiong/gstreamer,StreamUtils/gstreamer,krichter722/gstreamer