Bottom-up Search and Transfer Learning in Markov Logic