sys: lib: ringbuffer: introduce ringbuffer_get_free

This function returns the number of bytes available in the ringbuffer.
Merge pull request #1650 from kaspar030/ringbuffer_get_free

sys: lib: ringbuffer: introduce ringbuffer_get_free