Senate to vote Thursday on bipartisan deal that could reopen government