Part 7: Improve `TermBuilder` interface; expose lookup refs and tx functions.
Part 7: Improve `TermBuilder` interface; expose lookup refs and tx functions.

These are functions on `TermBuilder` itself to prevent mixing mutable
and immutable references in the most natural style.  That is,
```
builder.add(e, a, builder.lookup_ref(...))
```
fails because `add` borrows `builder` mutably and `lookup_ref` borrows
`builder` immutably.  There's nothing here that requires a specific
builder (since we're not interning lookup refs on the builder, like we
are tempids) so we don't need an instance.

ncalexan/mentat,ncalexan/mentat,ncalexan/mentat,mozilla/mentat,ncalexan/datomish,mozilla/mentat,ncalexan/datomish,ncalexan/mentat,mozilla/mentat,mozilla/mentat,mozilla/mentat,ncalexan/mentat,ncalexan/mentat,mozilla/mentat