Use unique iframe names based on unique domain
Use unique iframe names based on unique domain

Browsers are weird. If an iframe has a `name` attribute, it’s window
will be cached. When you click a link, then go back, it will insert the
**same** src window into the iframe regardless of a different `src`.

Well, that hurts us since we generate a unique domain to load 3p
frames. We’ll continue to use an old domain’s window, even though the
src points to a new domain. Worse, when we post messages to the 3p
frame, we will send it with an origin parsed from the `src` attribute
even though that is not the real URL of the frame’s window.

Fixes https://github.com/ampproject/amphtml/issues/2943

fullspeed-sp/amphtml,nexxtv/amphtml,jpettitt/amphtml,taboola/amphtml,comScore/amphtml,engtat/amphtml,prateekbh/amphtml,cory-work/amphtml,alanorozco/amphtml,DistroScale/amphtml,lzanol/amphtml,dvoytenko/amphtml,danielrozenberg/amphtml,pedjoni8/amphtml,yieldmo/amphtml,nexxtv/amphtml,Gregable/amphtml,adtechnology/amphtml,jlucero-contentad/amphtml,jridgewell/amphtml,camelburrito/amphtml,adup-tech/amphtml,sriramkrish85/amphtml,interspacejp/amphtml,clawr/amphtml,sharethrough/amphtml,Lith/amphtml,galeksic/amphtml,avimehta/amphtml,nexxtv/amphtml,jpettitt/amphtml,DAC-f1h-dev/amphtml,vmarteev/amphtml,pietergreyling/amphtml,Gregable/amphtml,mkhatib/amphtml,Mobusi-ads/amphtml,zhouyx/amphtml,yandex-pcode/amphtml,avimehta/amphtml,ericlindley-g/amphtml,zhucl/amphtml,Adtoma/amphtml,media-net/amphtml,danielrozenberg/amphtml,dvoytenko/amphtml,ericlindley-g/amphtml,kixer-com/amphtml,cvializ/amphtml,AaronCritchley/amphtml,prateekbh/amphtml,Mobusi-ads/amphtml,shawnbuso/amphtml,powdercloud/amphtml,jridgewell/amphtml,camelburrito/amphtml,rajkumarsrk/amphtml,Mobusi-ads/amphtml,comScore/amphtml,voyagegroup/amphtml,pietergreyling/amphtml,laterpay/amphtml,luciancrasovan/amphtml,sriramkrish85/amphtml,donttrustthisbot/amphtml,Lith/amphtml,gumgum/amphtml,sortable/amphtml,honeybadgerdontcare/amphtml,lzanol/amphtml,prateekbh/amphtml,media-net/amphtml,mkhatib/amphtml,ecoron/amphtml,amoad-amoe/amphtml,ampproject/amphtml,wjfang/amphtml,koshka/amphtml,lzanol/amphtml,yevheniiminin/amphtml,zhucl/amphtml,rlugojr/amphtml,danielrozenberg/amphtml,zhangsu/amphtml,lannka/amphtml,arealit/amphtml,pietergreyling/amphtml,aghassemi/amphtml,ruturajv-media-net/amphtml,keithwrightbos/amphtml,chaveznvg/amphtml,engtat/amphtml,yieldbot/amphtml,zhucl/amphtml,rsimha-amp/amphtml,avimehta/amphtml,mhc-gh/amphtml,fullspeed-sp/amphtml,DarXector/amphtml,danielrozenberg/amphtml,kixer-com/amphtml,sharethrough/amphtml,sortable/amphtml,taboola/amphtml,comScore/amphtml,alanorozco/amphtml,ecoron/amphtml,bpaduch/amphtml,yieldmo/amphtml,yieldmo/amphtml,jlucero-contentad/amphtml,comScore/amphtml,techhtml/amphtml,smartadserver/amphtml,sriramkrish85/amphtml,zhucl/amphtml,Adtoma/amphtml,jlucero-contentad/amphtml,pietergreyling/amphtml,DarXector/amphtml,jpettitt/amphtml,britice/amphtml,alanorozco/amphtml,BenDz/amphtml,dotandads/amphtml,adup-tech/amphtml,JuliusThms/amphtml,adiant/amphtml,pietergreyling/amphtml,burtcorp/amphtml,voyagegroup/amphtml,DarXector/amphtml,BenDz/amphtml,nexxtv/amphtml,rifler/amphtml,DAC-f1h-dev/amphtml,devjsun/amphtml,sharethrough/amphtml,jridgewell/amphtml,criteo-forks/amphtml,nexxtv/amphtml,adiant/amphtml,rifler/amphtml,prateekbh/amphtml,donttrustthisbot/amphtml,lannka/amphtml,jdelhommeau/amphtml,dotandads/amphtml,adup-tech/amphtml,jdelhommeau/amphtml,wjfang/amphtml,spotxchange/amphtml,vmarteev/amphtml,dotandads/amphtml,donttrustthisbot/amphtml,smartadserver/amphtml,fullspeed-sp/amphtml,amoad-amoe/amphtml,pedjoni8/amphtml,lzanol/amphtml,cory-work/amphtml,taboola/amphtml,erwinmombay/amphtml,widespace-os/amphtml,ampproject/amphtml,comScore/amphtml,luciancrasovan/amphtml,mhc-gh/amphtml,burtcorp/amphtml,ericlindley-g/amphtml,jasti/amphtml,tdrl/amphtml,camelburrito/amphtml,yevheniiminin/amphtml,lannka/amphtml,Mixpo/amphtml,BenDz/amphtml,cory-work/amphtml,AaronCritchley/amphtml,ampproject/amphtml,tdrl/amphtml,widespace-os/amphtml,sebastianbenz/amphtml,burtcorp/amphtml,interspacejp/amphtml,jdelhommeau/amphtml,voyagegroup/amphtml,mkhatib/amphtml,dvoytenko/amphtml,engtat/amphtml,clawr/amphtml,vmarteev/amphtml,Mixpo/amphtml,luciancrasovan/amphtml,rlugojr/amphtml,jridgewell/amphtml,Adtoma/amphtml,powdercloud/amphtml,zhangsu/amphtml,burtcorp/amphtml,rlugojr/amphtml,donttrustthisbot/amphtml,adup-tech/amphtml,Gregable/amphtml,ADITION/amphtml,adiant/amphtml,sortable/amphtml,danielrozenberg/amphtml,britice/amphtml,shawnbuso/amphtml,gumgum/amphtml,media-net/amphtml,nexxtv/amphtml,laterpay/amphtml,Mobusi-ads/amphtml,donttrustthisbot/amphtml,taboola/amphtml,interspacejp/amphtml,tlong2/amphtml,prateekbh/amphtml,mkhatib/amphtml,BenDz/amphtml,taboola/amphtml,keithwrightbos/amphtml,amoad-amoe/amphtml,Mobusi-ads/amphtml,mlb7687/amphtml,ericlindley-g/amphtml,yevheniiminin/amphtml,clawr/amphtml,erwinmombay/amphtml,engtat/amphtml,laterpay/amphtml,mlb7687/amphtml,bpaduch/amphtml,Mixpo/amphtml,criteo-forks/amphtml,dvoytenko/amphtml,jasti/amphtml,jasti/amphtml,chaveznvg/amphtml,ampproject/amphtml,dvoytenko/amphtml,dotandads/amphtml,fullspeed-sp/amphtml,cory-work/amphtml,arealit/amphtml,erwinmombay/amphtml,adiant/amphtml,galeksic/amphtml,pedjoni8/amphtml,ampproject/amphtml,DAC-f1h-dev/amphtml,voyagegroup/amphtml,jdelhommeau/amphtml,koshka/amphtml,shawnbuso/amphtml,jlucero-contentad/amphtml,jridgewell/amphtml,honeybadgerdontcare/amphtml,smartadserver/amphtml,powdercloud/amphtml,kamtschatka/amphtml,donttrustthisbot/amphtml,sebastianbenz/amphtml,chaveznvg/amphtml,rajkumarsrk/amphtml,src-code/amphtml,arealit/amphtml,sklobovskaya/amphtml,adiant/amphtml,BrightcoveOS/amphtml,BenDz/amphtml,kamtschatka/amphtml,engtat/amphtml,yevheniiminin/amphtml,criteo-forks/amphtml,arealit/amphtml,kmh287/amphtml,vmarteev/amphtml,jmadler/amphtml,engtat/amphtml,zhouyx/amphtml,laterpay/amphtml,yieldbot/amphtml,devjsun/amphtml,Adtoma/amphtml,keithwrightbos/amphtml,triplelift/amphtml,tdrl/amphtml,prateekbh/amphtml,adtechnology/amphtml,widespace-os/amphtml,DarXector/amphtml,yieldbot/amphtml,sriramkrish85/amphtml,koshka/amphtml,spotxchange/amphtml,zhangsu/amphtml,BenDz/amphtml-atinternet,prateekbh/amphtml,Lith/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,chaveznvg/amphtml,pedjoni8/amphtml,powdercloud/amphtml,mlb7687/amphtml,voyagegroup/amphtml,kamtschatka/amphtml,vmarteev/amphtml,yieldmo/amphtml,spotxchange/amphtml,zhangsu/amphtml,dvoytenko/amphtml,AaronCritchley/amphtml,zhangsu/amphtml,taboola/amphtml,mhc-gh/amphtml,BrightcoveOS/amphtml,devjsun/amphtml,honeybadgerdontcare/amphtml,camelburrito/amphtml,yieldmo/amphtml,shawnbuso/amphtml,sriramkrish85/amphtml,jmadler/amphtml,src-code/amphtml,avimehta/amphtml,gumgum/amphtml,techhtml/amphtml,triplelift/amphtml,zhouyx/amphtml,mhc-gh/amphtml,ADITION/amphtml,powdercloud/amphtml,criteo-forks/amphtml,tdrl/amphtml,criteo-forks/amphtml,cvializ/amphtml,lzanol/amphtml,rajkumarsrk/amphtml,JuliusThms/amphtml,jpettitt/amphtml,yevheniiminin/amphtml,techhtml/amphtml,sklobovskaya/amphtml,AaronCritchley/amphtml,lannka/amphtml,triplelift/amphtml,ruturajv-media-net/amphtml,amoad-amoe/amphtml,erwinmombay/amphtml,vmarteev/amphtml,chaveznvg/amphtml,aghassemi/amphtml,kmh287/amphtml,DAC-f1h-dev/amphtml,sharethrough/amphtml,yandex-pcode/amphtml,media-net/amphtml,JuliusThms/amphtml,smartadserver/amphtml,jlucero-contentad/amphtml,yieldbot/amphtml,arealit/amphtml,tlong2/amphtml,tdrl/amphtml,kamtschatka/amphtml,Gregable/amphtml,keithwrightbos/amphtml,gumgum/amphtml,mlb7687/amphtml,jlucero-contentad/amphtml,taboola/amphtml,cvializ/amphtml,sharethrough/amphtml,luciancrasovan/amphtml,sriramkrish85/amphtml,jmadler/amphtml,keithwrightbos/amphtml,honeybadgerdontcare/amphtml,shawnbuso/amphtml,arealit/amphtml,jmadler/amphtml,gumgum/amphtml,lzanol/amphtml,chaveznvg/amphtml,media-net/amphtml,burtcorp/amphtml,ADITION/amphtml,devjsun/amphtml,laterpay/amphtml,clawr/amphtml,kmh287/amphtml,triplelift/amphtml,shawnbuso/amphtml,jasti/amphtml,powdercloud/amphtml,aghassemi/amphtml,wjfang/amphtml,Adtoma/amphtml,interspacejp/amphtml,sklobovskaya/amphtml,rifler/amphtml,mkhatib/amphtml,burtcorp/amphtml,src-code/amphtml,Mobusi-ads/amphtml,alanorozco/amphtml,lannka/amphtml,Mixpo/amphtml,jmadler/amphtml,rsimha-amp/amphtml,amoad-amoe/amphtml,wjfang/amphtml,yandex-pcode/amphtml,sortable/amphtml,Mixpo/amphtml,sortable/amphtml,yieldmo/amphtml,aghassemi/amphtml,kixer-com/amphtml,DistroScale/amphtml,ampproject/amphtml,mhc-gh/amphtml,kixer-com/amphtml,jpettitt/amphtml,alanorozco/amphtml,DAC-f1h-dev/amphtml,koshka/amphtml,powdercloud/amphtml,ruturajv-media-net/amphtml,jdelhommeau/amphtml,clawr/amphtml,ericlindley-g/amphtml,DistroScale/amphtml,voyagegroup/amphtml,fullspeed-sp/amphtml,media-net/amphtml,pedjoni8/amphtml,media-net/amphtml,kmh287/amphtml,jpettitt/amphtml,gumgum/amphtml,Gregable/amphtml,luciancrasovan/amphtml,DistroScale/amphtml,adtechnology/amphtml,alanorozco/amphtml,avimehta/amphtml,kamtschatka/amphtml,ecoron/amphtml,rajkumarsrk/amphtml,adiant/amphtml,zhucl/amphtml,sklobovskaya/amphtml,mhc-gh/amphtml,jridgewell/amphtml,comScore/amphtml,yandex-pcode/amphtml,keithwrightbos/amphtml,cory-work/amphtml,jridgewell/amphtml,rifler/amphtml,sklobovskaya/amphtml,clawr/amphtml,Gregable/amphtml,rsimha-amp/amphtml,tlong2/amphtml,jdelhommeau/amphtml,devjsun/amphtml,src-code/amphtml,zhouyx/amphtml,erwinmombay/amphtml,cvializ/amphtml,camelburrito/amphtml,ecoron/amphtml,zhangsu/amphtml,cory-work/amphtml,smartadserver/amphtml,kixer-com/amphtml,lannka/amphtml,wjfang/amphtml,cvializ/amphtml,rajkumarsrk/amphtml,honeybadgerdontcare/amphtml,DistroScale/amphtml,dotandads/amphtml,rsimha-amp/amphtml,luciancrasovan/amphtml,mhc-gh/amphtml,techhtml/amphtml,zhouyx/amphtml,JuliusThms/amphtml,sklobovskaya/amphtml,smartadserver/amphtml,kmh287/amphtml,BrightcoveOS/amphtml,src-code/amphtml,ecoron/amphtml,BenDz/amphtml,src-code/amphtml,yieldbot/amphtml,zhucl/amphtml,dotandads/amphtml,rajkumarsrk/amphtml,jasti/amphtml,danielrozenberg/amphtml,gumgum/amphtml,amoad-amoe/amphtml,koshka/amphtml,rlugojr/amphtml,ruturajv-media-net/amphtml,camelburrito/amphtml,yandex-pcode/amphtml,rifler/amphtml,engtat/amphtml,honeybadgerdontcare/amphtml,avimehta/amphtml,jpettitt/amphtml,lannka/amphtml,tlong2/amphtml,triplelift/amphtml,Gregable/amphtml,mkhatib/amphtml,DistroScale/amphtml,AaronCritchley/amphtml,yandex-pcode/amphtml,widespace-os/amphtml,fullspeed-sp/amphtml,nexxtv/amphtml,sortable/amphtml,ecoron/amphtml,BrightcoveOS/amphtml,techhtml/amphtml,sebastianbenz/amphtml,luciancrasovan/amphtml,sebastianbenz/amphtml,mlb7687/amphtml,spotxchange/amphtml,BenDz/amphtml-atinternet,yevheniiminin/amphtml,bpaduch/amphtml,mlb7687/amphtml,JuliusThms/amphtml,aghassemi/amphtml,JuliusThms/amphtml,AaronCritchley/amphtml,ampproject/amphtml,BrightcoveOS/amphtml,techhtml/amphtml,galeksic/amphtml,widespace-os/amphtml,mhc-gh/amphtml,camelburrito/amphtml,comScore/amphtml,erwinmombay/amphtml,danielrozenberg/amphtml,jasti/amphtml,Lith/amphtml,adiant/amphtml,rlugojr/amphtml,aghassemi/amphtml,ruturajv-media-net/amphtml,kixer-com/amphtml,Adtoma/amphtml,interspacejp/amphtml,Lith/amphtml,adup-tech/amphtml,Lith/amphtml,kixer-com/amphtml,Mixpo/amphtml,alanorozco/amphtml,zhucl/amphtml,sebastianbenz/amphtml,shawnbuso/amphtml,honeybadgerdontcare/amphtml,cvializ/amphtml,criteo-forks/amphtml,jpettitt/amphtml,media-net/amphtml,devjsun/amphtml,wjfang/amphtml,DarXector/amphtml,tlong2/amphtml,wjfang/amphtml,voyagegroup/amphtml,galeksic/amphtml,tdrl/amphtml,yieldbot/amphtml,adtechnology/amphtml,rsimha-amp/amphtml,britice/amphtml,adup-tech/amphtml,jmadler/amphtml,koshka/amphtml,rifler/amphtml,kamtschatka/amphtml,tlong2/amphtml,DAC-f1h-dev/amphtml,ADITION/amphtml,bpaduch/amphtml,triplelift/amphtml,kmh287/amphtml,sharethrough/amphtml,ruturajv-media-net/amphtml,BrightcoveOS/amphtml,britice/amphtml,cory-work/amphtml,ampproject/amphtml,ericlindley-g/amphtml,rlugojr/amphtml,adtechnology/amphtml,alanorozco/amphtml,zhouyx/amphtml,adtechnology/amphtml,rsimha-amp/amphtml,arealit/amphtml,ADITION/amphtml,sklobovskaya/amphtml,spotxchange/amphtml,interspacejp/amphtml,spotxchange/amphtml,sebastianbenz/amphtml,laterpay/amphtml,rajkumarsrk/amphtml,Gregable/amphtml,bpaduch/amphtml,pedjoni8/amphtml,rsimha-amp/amphtml,DarXector/amphtml,BenDz/amphtml-atinternet,donttrustthisbot/amphtml,pietergreyling/amphtml,galeksic/amphtml,widespace-os/amphtml,vmarteev/amphtml,bpaduch/amphtml,keithwrightbos/amphtml,bpaduch/amphtml,clawr/amphtml,yieldmo/amphtml,yandex-pcode/amphtml