Highly ranked apps, with millions of installations in total on Google Play, aggressively served ads and drained mobile batteries.