The terror cell responsible for attacks in Barcelona and Cambrils has been dismantled, but a manhunt for one suspect is continuing, Spanish authorities have said.