pathfinder: rewrite search depth

Now cumulative saerch depth can be reset via resetDepth and get via getDepth.