Senate advances deal with backing of 8 Democrats, paving way for end of shutdown