Structural defects in bulk and epitaxial CdTe