This infrastructure is a foundation for writing some algorithms
generically without resorting to templates, by treating "references"
(usually pointers) to objects such as basic blocks as opaque handles.
Subsequent changes will add more mechanisms to facilitate working with
such handles, and introduce type-erased base classes in some places
(e.g. dominator trees) in terms of handles.