Tries to pop a step from the front of the TRAJECTORY. If the trajectory is empty, Ok(None) is returned.
Otherwise checks that the popped planning_step matches the provided Attempt, and then returns a new
PlanningStep (as an Ok(Some(planning_step))), with the Attempt in the popped step replaced with the providedAttempt.
If the Attempts do not match, Err(TrajectoryError::OffTrajectory) is returned and a
TrajectoryDeviation is sent up the pipe to the navigator.