The Barcelona terrorist attack, and how Europe can prevent another