mediacodec: Simplify the GetOutput function

The loop parameter is always 0 nowadays.

Always call the dequeueOutputBuffer method again if it returned
changed output buffers or changed output format.

Signed-off-by: Martin Storsjö <martin@martin.st>
oss: use SNDCTL_DSP_HALT in Flush() as in Stop() (fixes #9760)

(There does not appear to be much logic there, this might be a driver
issue or confusing documentation.)