The job cuts come as the company spends billions to expand the data centers powering its AI business.