Leveraging Ontologies for Lifted Probabilistic Inference and Learning