iio: Add reference counting for buffers