Recomputes byte offsets for all labels and instructions in the AST from
scratch, in node order. Called after any pass that alters the node list so
there is a single authoritative place that assigns offsets.
Removes unreachable functions and exposes the CFG before and after the pass.
The observer owns any optional diagnostics or I/O, keeping the pass itself pure.