Meta Platforms is testing the math behind the artificial-intelligence buildout: How long can you increase capital expenditures out of cash flow—and what do you do when you hit the wall?