Inelastic x-ray scattering in heterostructures: electronic excitations in LaAlO3/SrTiO3