Refactored ringbuffer code. Put in its own branch while I sort out an audio bug
Merge branch 'ringbuffer_refactor'

Conflicts:
	src/ringbuffer.cpp
	src/ringbuffer.h
Splits ringbuffer into its own file.