A Unified View of Algorithms for Path Planning Using Probabilistic Inference on Factor Graphs