Alphabet Inc.’s Google has invested $1 billion in futures-exchange giant CME Group Inc. and struck a deal to move the company’s core trading systems to the cloud. Under the deal, the technology giant’s Google Cloud unit would eventually power markets that handle trillions of dollars in trades each day.