Model for the resistance variation of a thin semiconducting film during temperature- programmed desorption: Application to the O2-CdSe system