The longest government shutdown in U.S. history appears to be coming to an end, as Congress moves forward on a bipartisan deal to reopen federal agencies.