Armed conflict, terrorism, and the allocation of foreign aid