Constraints on Cosmology and the Physics of the Intracluster Medium from Secondary Anisotropies in the Cosmic Microwave Background