A Variational Principle for the Linear Coupled Thermoelastodynamic Analysis of Mechanism Systems