membuf: add membuf_added and membuf_unadd APIs.