Spirit Airlines terminated its merger agreement with Frontier Airlines on Wednesday, months after a rival bid by JetBlue Airways marred the planned tie-up. The announcement ends a protracted battle over the budget airline known for its bare bones service and low fares.