The Complexity of MAP Inference in Bayesian Networks Specified Through Logical Languages