Differentiable Constrained Imitation Learning for Robot Motion Planning and Control