Expand and document DDatabase

Refactor `entity`, `entid`, and `ident`, implement `asOfT`, and add documentation.