S&P Global Inc. has agreed to buy IHS Markit Ltd. for about $39 billion in stock, a deal that accelerates the wave of consolidation among the finance industry’s biggest data providers. S&P is offering ...