US Senate clears bipartisan spending bill narrowly avoids governmentshutdown