The Casimir Effect and Thermodynamic Instability