USA:s senat har sagt ja till ett förslag angående budgeten som gör att landets statsapparat inte behöver stängas ned de närmaste två månaderna.