Microstructure and stress evolution in thin films during phase transformation: what can we learn from in situ X-ray diffraction studies?