The Thermodynamics of Irreversible Processes. IV. The Theory of Elasticity and Anelasticity