Reddit said Tuesday that it turned a profit in its third quarter — a first for the social-media platform since becoming a public company earlier this year.