Determination of the lattice strain and chemical composition of semiconductor heterostructures by high-resolution x-ray diffraction