Band offsets and density of Ti3+ states probed by x-ray photoemission on LaAlO3/SrTiO3 heterointerfaces and their LaAlO3 and SrTiO3 bulk precursors