Minimum principles, convexity, and thermodynamics in viscoelasticity