Separated identification of transitions from call.

Now we first identify where the transitions are, then check that each
subtrajectory is in the required ensemble. This is necessary for ensemble
such as LeaveX/HitX where the can_append condition is not equivalent to the
in-ensemble condition.