Recursively insert an object and its referenced objects
Insert the object as well as any object it references.
the packbuilder
the id of the root object to insert
optional name for the object
0 or an error code