lwlibav: Improve VC-1/WMV3 in ASF handling.

Fix PTS generation when any B-picture or BI-picture are present.
lwlibav: Fix parsing WMV3 in ASF.
lwlibav: typedef lwlibav_video_{output, scaler}_handler_t in the common header.
libavsmash: typedef libavsmash_video_{output, scaler}_handler_t in the common header.
lwlibav: Move the codes of importing AVIndexEntrys as common.
common: Integrate the codes of cleaning up video output handler.
vslsmas: Also set properties on the first valid frame.
lwlibav: Don't write fixed frame properties through format specifiers.
lwlibav: Don't return negative value when getting picture type unless failing memory allocation.
libavsmash: Integrate the codes of cleaning up video decode handler.
libavsmash: Integrate the codes of cleaning up audio decode handler.
common: Integrate the codes of cleaning up audio output handler.
utils: Include cpp_compat.h.
lwlibav: Fix current video frame number correction.
Merge branch 'plain' into build-msvc

Merge revision: r534
Conflicts:
	AviUtl/libav_input.c
	AviUtl/video_output.c
	VapourSynth/libavsmash_source.c
	VapourSynth/lwlibav_source.c
	common/lwindex.c
common: Use refcounted_frames for the first valid video frame.

Now, video hanlders always uses refcounted_frames.
common: Move the first video frame buffer to the video decode handlers.
lsmashsource: Fix freeing the private output handler.

This is a regression in 66345ef6d0.
vslsmas: Forgot to free background frame.
lwlibav: Always set up the parser externally.

We don't trust parameters returned by the internal parser.