dynamic_buffer: use new buffer internally The API of dynamic_buffer is now a slim swapper around the new buffer API. This changes many places where the dynamic_buffer internals were directly used.