new: if called with 'nocollaps' it will not collaps adjacent equal states. Needed to create QTC reps with distances.
change: plot is now variable anymore. Call with 'plot' to toggle plotting.
Function to insert transition states into qtc_c or qtc_b rep to create legal state chains.
First attempt of creating "layered hierarchical qtc reps.
Takes a qtc_c rep, a distance vector and a threshold. If dist > threshold it will transform qtc_c into qtc_b.
Returns a cell array of qtc_b and qtc_c reps.