Pinterest cuts 15% of its workforce and reduces office space as it looks to drive forward its AI strategy.