StubHub beat Wall Street’s expectations for second-quarter revenue in its first earnings report as a public company.