Role of Structural Defects on the Half-Metallic Character of Heusler Alloys and Their Junctions with Ge and GaAs