Pinterest fired employees who built a layoff-tracking tool as the company restructures around AI, while facing rising competition from major AI and ad platforms.