Human-in-the-Loop Task and Motion Planning for Imitation Learning