avformat/concatdec: add fallback for calculating file duration

If a file does not have a known duration, this leads to the timestamps
starting over for the next file, causing non-monotonic timestamps.
To prevent this, track the duration during demuxing and use it to
determine the current file duration before opening the next file.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
