Meta’s results raised skepticism over the payoff from its aggressive artificial intelligence spending plans and overshadowed strong results.