The company’s pilots finally agreed to a new contract, but Republic still faces a long road to recovery.