African Allies Grapple With Rise in Terrorist Attacks as U.S. Pulls Back