Theory of te precipitation and related effects in CdTe Crystals