ao_coreaudio: uncrustify

uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace \
  audio/out/ao_coreaudio.c
ao_coreaudio: move to new libao API

This is just a first pass and the bare minimum to make it compile and work.
SPDIF is untested for lack of hardware.
ao_coreaudio: split ringbuffer in it's own file

This is hopefully the start of something good. ca_ringbuffer_read and
ca_ringbuffer_write can probably cleaned up from all the NULL checks once
ao_coreaudio.c gets simplyfied.

Conflicts:
	audio/out/ao_coreaudio.c
ao_coreaudio: fix output with spdif

The mute condition was inverted...
core: add a spsc ringbuffer implementation

Currently every single AO was implementing it's own ringbuffer, many times
with slightly different semantics. This is an attempt to fix the problem.

I stole some good ideas from ao_portaudio's ringbuffer and went from there.
The main difference is this one stores wpos and rpos which are absolute
positions in an "infinite" buffer. To find the actual position for writing /
reading just apply modulo size.

The producer only modifies wpos while the consumer only modifies rpos. This
makes it pretty easy to reason about and make the operations thread safe by
using barriers (thread safety is guaranteed only in the Single-Producer/Single-
Consumer case).

Also adapted ao_coreaudio to use this ringbuffer.
ao_portaudio: use mp_ring
ao_jack: use mp_ring