Google’s huge but obscure network of search partners—used, perhaps unknowingly, by thousands of advertisers including such titans as Procter & Gamble Co., big banks and U.S. law enforcement and military recruitment advertisers—included at least until yesterday Iranian, Italian, Vietnamese and other porn sites and websites of companies subject to U.S. sanctions, according to an investigation by research firm Adalytics.