Scalable Differentiable Physics for Learning and Control