Pinterest plans to cut less than 15% of its workforce and shrink office space as it shifts more resources toward AI-driven products.