Congress reached a deal — and a process — to avoid a default on U.S. debt and the reopening of the government.