Analysis of Bayesian Inference Algorithms by the Dynamical Functional Approach