Meta is preparing to trim about 8,000 jobs as it keeps pouring money into AI, and Wall Street seems pleased with the math.