Energy-consistent time integration for nonlinear viscoelasticity