The Chinese online-search giant posted better-than-expected earnings for the second quarter. The growth was mostly driven by strong membership in its video-streaming subsidiary iQiyi, while revenue in its online marketing segment declined from the year-ago period.