Ultrafast acoustic response of semiconductor heterostructures analyzed by time-resolved hard X-ray diffraction