Exact Bayesian inference for off-line change-point detection in tree-structured graphical models