Marginal Consistency: Unifying Constraint Propagation on Commutative Semirings