Congress advances deal to fund government, potentially averting shutdown