coreaudio: use the new device selection API

The CoreAudio API is built around device IDs so we store the integer as string
and read it back.