libavutil: add utility functions to simplify allocation of audio buffers.