The social-media company announced a deal to integrate Perplexity’s AI-powered answer engine directly into Snapchat.