Fixes to ensure that new containers for AMs also get XTraceMetadata
propagated.
FINALLY resolved a stupid bloody state machine issue.  Basically, if
the xtracecontext when transitioning a state is the same as the
xtracecontext when starting the previous transition, then it is
redundant to link to both the previous transition and the current
xtracecontext; we only need to link to the previous transition.  Not
checking this was resulting in HUGE numbers of additional, unnecessary
links.  Screw you state machine, I hate you.