Compositional Probabilistic and Causal Inference using Tractable Circuit Models