Factor out some duplicated code in OutputFrame/OutputField
Use std::min/max rather than FFMIN/FFMAX
Use an initializer list to init AvisynthVideoSource
Fix unsigned underflow when seeking to the beginning of audio
Handle files where the first audio packet has multiple output frames

We need to decode the first packet to get the audio properties, but we
can't store the result since we don't know the output format yet.
Previously we just left the unconverted data in the output buffer to be
cached once we do know the output format, but that doesn't work when the
first package has multiple frames of audio, as only one can be saved.

Fix this by just flushing the cache and reopening the file whenever the
output format changes, which results in the first packet being decoded
twice, but that's not a huge deal. This also happens to add support for
changing the output format after getting audio.
Fix caching of audio with multiple frames per packet