avaudenc/avvidenc: Reopen encoding session if it's required

Since the commit https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/22b25b3ea5c,
ffmpeg will not clear draning flag for encoder by avcodec_flush_buffers() API
by default. Allowed case is only if encoder has AV_CODEC_CAP_ENCODER_FLUSH
capability flag. If it's not supported, we should re-open encoding
session, otherwise ffmpeg encoder will keep returning AVERROR_EOF

Part-of: <gstreamer/gst-libav!99>
30 jobs for avenc-reopen in 36 minutes and 22 seconds (queued for 5 seconds)