Authorities said they unearthed evidence that a broad network spanning four towns and involving a dozen suspects carried out the terror attacks in Spain, raising concerns that Islamic State is still capable of orchestrating coordinated assaults despite major losses in Syria and Iraq.