Social media company Snap announced it would lay off 16% of its workforce on Wednesday as it embraces AI in its pursuit of profitability.