refdb - abstract reference reading/writing
no more ref owner
comments, move some refdb decls to internal