Theoretical study of ligand and solvent effects on optical properties and stabilities of CdSe nanoclusters