Common: Restore Path class functionality removed in dd0d614

The CPath class was added for convenience of navigating the path, so I
think the changes made in dd0d61435d51645b1e7495f0db1401091016e4bf ruin
the purpose of the class, making it essentially just a std::vector wrapper.
Now it has both old (keeping track of current postition) and new (iterator
access) functionality.