Finding the M Most Probable Configurations in Arbitrary Graphical Models