Electronic spectroscopy of N- and C-substituted chlorocarbazoles in homogeneous media and in solid matrix