decoder/ffmpeg: add API documentation
decoder/ffmpeg: use av_free() instead of av_freep()
decoder/ffmpeg: move code to lib/ffmpeg/Time.hxx
lib/ffmpeg/Time: add API documentation
decoder/ffmpeg: merge avformat_close_input() calls
decoder/ffmpeg: use more references
decoder/ffmpeg: remove redundant audio stream check
decoder/ffmpeg: skip _scan_stream() if no audio stream was found
decoder/ffmpeg: use AVStream::duration

Use the duration of the stream we're actually decoding - not the
"global" attribute AVFormatContext::duration which may differ.