drop 'prePathBeginRun'

Cache the first/last path and endpath names by string instead of by
pointer; this makes the comparison slower, but we should migrate to
pathIDs anyway.
In the long term it's not clear whether it makes sense to keep track
of the "first" and "last" paths in a multithreaded environment.