Spirit Airlines, which had been in danger of going out of business due to ongoing losses and two bankruptcy filings, has reached a deal that will allow it to survive, albeit as a smaller company.