Properties and Spectroscopic Implications of Thermal Instability in X-Ray Binary and AGN Accretion Flows