(PDB-708) Convert factmap-to-paths* to be more functional and other cleanups

Signed-off-by: Ken Barber <ken@bob.sh>