Terrorist Learning: A New Analytical Framework