membuf: new module for linear memory buffers.