Lossless Coding of Markov Random Fields with Complex Cliques