object: import some refcounting and documentation fixes from QuixDB

Signed-off-by: Evan Nemerson <evan@coeus-group.com>