univalue.h: add simple self-query api to object