Reddit Inc. reported its second quarterly results as a public company Tuesday, with the social-media platform reporting better-than-expected revenue and a narrower-than-expected loss, and giving sales guidance that surpassed Wall Street’s expectations.