sys: lib: ringbuffer: introduce ringbuffer_get_free

This function returns the number of bytes available in the ringbuffer.

Basically a getter for rb->avail.
rb->avail = Number of elements available for reading.
You want
```
return rb->size - rb->avail;
```