Intel reported stronger-than-expected second-quarter earnings on Thursday, beating Wall Street revenue estimates while sharply reducing investments in its ambitious foundry business. The move marks a significant pivot for the chipmaker as CEO Pat Gelsinger seeks…