A Normative Theory for Causal Inference and Bayes Factor Computation in Neural Circuits