`trajectoryFG` and `multiPhaseTrajectoryFG` should be move to Trajectory and removed from DynamicsGraph.