In a ringbuffer implementation with only two begin/end pointers, it's
impossible to distinguish between an empty and a full ringbuffer. The
correct interpretation mode needs to be specified by the user.
A helper function is added to simplify implementing the devic_dump()
function on top of the device_read() function, and enable progress
events automatically.
Using a resizable memory buffer allows to allocate the right amount of
memory inside the backend, avoiding having to know the required buffer
size in advance.