Retired Canadian intelligence analyst writes book on history of terrorism