CXMT, one of China’s biggest memory-chip makers, posted a sharp jump in first-half sales and profit as artificial-intelligence companies scrambled for scarce memory supply, the latest evidence that it is cashing in on the global semiconductor shortage.