Biden signs bill averting a government shutdown after Trump’s intervention had imperiled congressional passage