While the world may be recording fewer terrorist attacks, it is simultaneously confronting a far more resilient and adaptive adversary