Americans are training African armies to guard their borders against infiltration by Al Qaeda’s militants.