Refactor CoreAudioDevice code to support on demand device opening and
closing when sound is not playing.
Currently device is opened when AUD_init() is called and then closed
immediately. This is because it seems, that this is causing issues with
synchronizer and causes AV sync to fail.