avoid reflexive calls in sohva

Make internal document types inherit from `IdRev` to avoid inefficient
reflexive calls.