Strain and composition determination in semiconducting heterostructures by high-resolution X-ray diffraction