Offline traces now guarantee that a branch target instruction entry in a trace must immediately follow the branch instruction with no intervening trace switch. Because doing this during online tracing would cost extra overhead due to the basic block-based instruction tracing, this is implemented in raw2trace by delaying a buffer-final branch until the next buffer for that thread.
Adds a trace_invariants tool linked into histogram_launcher where we can add sanity checks for trace invariants like this one.
Fixes #2638 (closed)