First-principles study of structural stabilities, and electronic and optical properties of CaF2 under high pressure