doc/examples/muxing: free swr context at the end

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/examples/muxing: Move samples_count to OutputStream

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/examples/muxing: add alloc_audio_frame() and use it to simplify code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>