wavpack: extract sample rate from the bitstream

This way we don't require the caller to parse the block header. It also
allows the sample rate to change mid-stream.
wavpack: extract channel information from the bitstream

This way we don't require the caller to parse the block header. It also
allows the channel configuration to change mid-stream.
wavpack: check that there aren't too many blocks per packet
wavpack: check that all the channels were coded.
lavf: rename wv.c to wvdec.c

wv.c will be used for shared wavpack functions.
wvdec: split block header parsing into a separate file

It will be reused by other muxers and demuxers.
matroskaenc: support muxing WavPack
apetag: add support for writing APE tags

This will be useful in the WavPack muxer.
lavf: add a raw WavPack muxer.