cainteoir_document: make the create buffer api use public objects