Theoretical study of finite-temperature spectroscopy in van der Waals clusters. I. Probing phase changes in CaArn