The contours of U.S. foreign policy have gradually taken shape during Donald Trump’s second term, dispelling African nations’ fears that the new administration might disengage from the continent.