Factor out common walking logic in PathServlet We can't just use a TreeWalk for this in all cases because it has no concept of being positioned just before a root tree. Plus, there are various other pieces that we pass around with TreeWalk that make sense to encapsulate together. Change-Id: Ia82d4df558aceef4c2ddd8a0b17972fbd3db01e0