The Senate advanced a funding bill with the backing of eight Democrats, a crucial step toward ending the longest government shutdown.