Principled and Efficient Motif Finding for Structure Learning of Lifted Graphical Models