Provably Robust And Accurate Methods For Rigid And Deformable Simulation With Contact