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
Fall back to seeking by file position when seeking by PTS fails
Fix warning when building with gcc
Fix incorrect seeking in y4m
Merge branch 'master' into cplugin_master

Conflicts:
	Makefile.am
	Makefile.in
	aclocal.m4
	configure
	ltmain.sh
	missing
Fix .travis.yml for the C-plugin branch
Update GNUmakefile

Remove:
stdiostream.cpp

Add:
filehandle.cpp
haalicommon.cpp
matroskareader.cpp
track.cpp
zipfile.cpp
GNUmakefile: Improve source file list readability
c_plugin: Fix regression in rffmode error handling.

The regression caused by r483 would cause it to error out even if we
didn't specify any change in the output color space.

Applies change from master @ ef81fe1
c_plugin: Remove CPUFlags stuff from the avisynth plugin

Applies changes from master @ f8207e3
c_plugin: Add FFMS_SetInputFormatV

This overrides the pixel format, color range and color space used for
the input when converting formats with swscale, for when the values
reported by lavc are incorrect, or for compatibility with other programs
that get the conversion wrong.

Applies change from master @ b058f2d