Density functional and complete active space self-consistent field investigations on the structure and electronic properties of TiCx (x = 2-4) clusters