omxil: Retry getting an output buffer while waiting for a free input buffer

As soon as either the input packet has been written, or an output
buffer is available, we return from the function, allowing passing
the output frames down the pipeline as soon as possible. (For
direct rendering, a new output buffer only become available for
the codec to use once the picture is rendered or discarded.)

This fixes playback with IOMX direct rendering on Nexus S, which
only uses 2 output buffers in this mode (min_undequeued = 1,
nBufferCountMin = 1), and probably also for other devices with
a small number of output buffers.

(On the Nexus S, the number of output buffers can't be increased,
since this leads to blinking.)

This is similar to how available input/output buffers are checked
in the MediaCodec plugin.

Ideally, the input and output buffer fifos could share a condition
variable to allow waiting for whichever of the two that becomes
available first.

This still isn't completely foolproof with respect to the case when
an input packet needs to be split up over multiple input buffers
though, but it wasn't completely correct previously either.
omxil: Don't return without either consuming the input packet or providing an output picture