The House has passed a bipartisan budget-and-debt deal that prevents an unprecedented government default.