Reimplement some of the Trajectory methods using an internal Iterator class

Document the conditions for `|last|` and its behaviour.