Al-Qaida’s main affiliate in Iraq avoided extinction at the hands of U.S. and Iraqi forces a decade ago by backing away from military engagements and moving the remnants of its network underground until its reemergence as the Islamic State. That successor organization, now confronting its own eventual fall, is devising a modified survival strategy that may involve surrendering control of its “caliphate” in Iraq and Syria but seeks to preserve a virtual version of it online.