The unraveling of Syria, Iraq, and Libya, together with the civil war that is tearing Yemen apart, have created vast killing fields, generated waves of refugees, and spawned Islamist militants who will remain a threat to international security for years to come.