Crossover from metal to insulator in dense lithium-rich compound CLi4