Crystallography and theory of X-ray diffraction of stacking faults in the double hexagonal close-packed structure