Piezoquartz resonator as an in situ method for studying the phase transitions in thin metal and alloy films