Path-reversal, Doi-Peliti generating functionals, and dualities between dynamics and inference for stochastic processes