Fix multichannel support for CoreAudioOutput.

Also, refactor CoreAudioOutput to use a DPointer to hide implementation.