Bayesian learning of dynamic multilayer networks