ao_coreaudio: refactor init_digital

This function still needs further work and cleanups. This is a nice step to
commit though.