High-energy magnetic excitations in overdoped La2-xSrxCuO4 studied by neutron and resonant inelastic x-ray scattering