Builds a per-realm value lazily, one per realm, purged with the realm.
called with the realm record to make its value
optional; called with whether each lookup found a value
a function answering the ambient realm's value, with of(id) for a named realm and existing() for the underlying Map
of(id)
existing()
Builds a per-realm value lazily, one per realm, purged with the realm.