The biggest layoffs in the platform’s 15-year history come just weeks after it posted a surprise profit for the third quarter.