Differentiable Simulation of Soft Robots with Frictional Contacts