Thermodynamic properties of magnetic impurities in metals