feat: write the segment path data out from the incremental cache (#74892)
This writes out the segment path information when the incremental cache
writes to disk. This also combines the multi-file writer approach used
in a few places into a single shared utility class.