flac: dynamically (re)size encoder buffer

This avoids buffer overflows in an obvious way.  In the
common case, the malloc overhead is only incurred once as
callers rarely (never?) resize buffers within a flow.

ref: Buffer overrun during FLAC encoding - ID: 3474924
http://sourceforge.net/tracker/?func=detail&aid=3474924&group_id=10706&atid=110706