Seol mar théacs é seo: Fast factorisation of probabilistic potentials and its application to approximate inference in Bayesian networks