Ancestry.com Operations Inc. defeated a proposed class action alleging it used consumers’ photos without their consent to advertise its services and attract new subscribers.