Allan Gray Ltd., which oversees $29 billion in assets, sees Nigeria’s stock rally as more broad-based than South Korea’s, offering investors a diversification play from the artificial-intelligence frenzy that has swept markets from Wall Street to Asia.