[PATCH 1/3] buf: Add a generic extensible buffer struct