Magnetic Excitations and Phase Separation in the Underdoped La2-xSrxCuO4 Superconductor Measured by Resonant Inelastic X-Ray Scattering