Add basic multi-path analysis infrastructure

We introduce the concept of a ThreadLocalScope to facilitate
multi-path analysis. For now, we assume that only External<T>
are used inside these scopes. Once more thought has gone into
guards, the plan is to mix single-path and multi-path analysis
to get a hybrid system.
Add Encoder::immediate_dominator_map(const Tracer&)

Currently, the mixing of single-path and multi-path analysis
is not supported.