basic transcoding to AC3 working for CoreAudio

fix slowdown caused by returning 0 from AddData
add proper delay code

no longer attempt to encode stereo
fix DD-Master encoding

cleanup

fixing cosmetic changes suggested by code review
add null check after m_encoder new

When adding to the unencodedBuffer, we should use addsize, not size in
the realloc. addsize is the post-convert size, and the actual size of
the data being added, which may be different then the size of the data
passed in.