Applications of the Gaussian kinematic formula to CMB data analysis