vtdec: Handle output in a separate thread
Requires !5112 (merged)
Adds the equivalent of !4967 (merged) to vtdec. A good chunk of code was directly adapted from there.
Implements a separate output loop running as a sourcepad task, which only cares about pushing frames as soon as there's enough of them in the queue. downstream_ret
will signal any failures with pushing things downstream, so that we can halt the decoder in handle_frame() or so.
Not exactly sure about the negotiation part that was previously in push_frames_if_needed() - I moved it to handle_frame(), which seems the most appropriate, and avoids possibly blocking the output loop unnecessarily (?).