Stock markets surge after US lawmakers move to end government shutdown