rawdec: use AVPALETTE_SIZE instead of magic constants.

Conflicts:
	libavcodec/rawdec.c
rawdec: work with refcounted frames.

Adapted from commit 759001c534287a96dc96d1e274665feb7059145d
by Anton Khirnov.

Also, fix the use of || instead of | in a flags check.
lavfi/audio: add missing include.
lavu/frame: copy the channels field.
lavfi/audio: set the channels field on allocated buffers.
lavfi/buffersrc: port to AVFrame.

Change ffmpeg to call the new API function instead of the
function in the old API with the same name.

Remove obsolete code in src_buffer.c.
lavfi: remove obsolete functions and code.
lavfi: disable buffersinks from the fork.
lavfi: move obsolete declarations to reduce diff with the fork.
lavfi/buffersink: upgrade to AVFrame.