amp-img: Cancel pending images on unlayout (#25014)
amp-img: Cancel pending images on unlayout (#25014)

* PWA: Cancel pending images on page transition

Free up network resources when navigating pages in a PWA by stopping any
images that haven't reached the 'complete' state from loading. There is
not an official spec for this, but browser support for changing 'src' to
an empty string is wide.

* Use dataURI and separate into function

* Move img fetch cancellation to amp-img unlayoutCallback

* Remove examples

* Remove img element after cancellation

zhouyx/amphtml,media-net/amphtml,yandex-pcode/amphtml,adup-tech/amphtml,voyagegroup/amphtml,jmadler/amphtml,jpettitt/amphtml,mhc-gh/amphtml,src-code/amphtml,media-net/amphtml,rsimha-amp/amphtml,ampproject/amphtml,dotandads/amphtml,prateekbh/amphtml,ampproject/amphtml,rsimha-amp/amphtml,alanorozco/amphtml,erwinmombay/amphtml,lannka/amphtml,honeybadgerdontcare/amphtml,dotandads/amphtml,jridgewell/amphtml,smartadserver/amphtml,prateekbh/amphtml,rsimha-amp/amphtml,prateekbh/amphtml,alanorozco/amphtml,jpettitt/amphtml,nexxtv/amphtml,sharethrough/amphtml,smartadserver/amphtml,prateekbh/amphtml,smartadserver/amphtml,taboola/amphtml,yandex-pcode/amphtml,media-net/amphtml,Gregable/amphtml,cory-work/amphtml,cory-work/amphtml,zhouyx/amphtml,lannka/amphtml,media-net/amphtml,erwinmombay/amphtml,nexxtv/amphtml,voyagegroup/amphtml,mhc-gh/amphtml,media-net/amphtml,sharethrough/amphtml,taboola/amphtml,danielrozenberg/amphtml,src-code/amphtml,jmadler/amphtml,jmadler/amphtml,voyagegroup/amphtml,Gregable/amphtml,erwinmombay/amphtml,media-net/amphtml,dotandads/amphtml,jpettitt/amphtml,sharethrough/amphtml,cory-work/amphtml,yandex-pcode/amphtml,ampproject/amphtml,taboola/amphtml,ampproject/amphtml,erwinmombay/amphtml,honeybadgerdontcare/amphtml,rsimha-amp/amphtml,nexxtv/amphtml,lannka/amphtml,alanorozco/amphtml,danielrozenberg/amphtml,jpettitt/amphtml,adup-tech/amphtml,Gregable/amphtml,jpettitt/amphtml,tlong2/amphtml,adup-tech/amphtml,voyagegroup/amphtml,jpettitt/amphtml,sharethrough/amphtml,ampproject/amphtml,voyagegroup/amphtml,yandex-pcode/amphtml,Gregable/amphtml,voyagegroup/amphtml,Gregable/amphtml,lannka/amphtml,honeybadgerdontcare/amphtml,tlong2/amphtml,tlong2/amphtml,mhc-gh/amphtml,prateekbh/amphtml,mhc-gh/amphtml,jmadler/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,erwinmombay/amphtml,rsimha-amp/amphtml,Gregable/amphtml,yandex-pcode/amphtml,smartadserver/amphtml,dotandads/amphtml,lannka/amphtml,jpettitt/amphtml,danielrozenberg/amphtml,Gregable/amphtml,src-code/amphtml,taboola/amphtml,zhouyx/amphtml,zhouyx/amphtml,smartadserver/amphtml,nexxtv/amphtml,ampproject/amphtml,tlong2/amphtml,mhc-gh/amphtml,cory-work/amphtml,jpettitt/amphtml,voyagegroup/amphtml,sharethrough/amphtml,jmadler/amphtml,taboola/amphtml,yandex-pcode/amphtml,adup-tech/amphtml,jridgewell/amphtml,nexxtv/amphtml,rsimha-amp/amphtml,smartadserver/amphtml,jridgewell/amphtml,rsimha-amp/amphtml,taboola/amphtml,cory-work/amphtml,cory-work/amphtml,jridgewell/amphtml,prateekbh/amphtml,cory-work/amphtml,ampproject/amphtml,jmadler/amphtml,mhc-gh/amphtml,jridgewell/amphtml,danielrozenberg/amphtml,honeybadgerdontcare/amphtml,zhouyx/amphtml,alanorozco/amphtml,zhouyx/amphtml,alanorozco/amphtml,nexxtv/amphtml,src-code/amphtml,taboola/amphtml,nexxtv/amphtml,adup-tech/amphtml,dotandads/amphtml,prateekbh/amphtml,honeybadgerdontcare/amphtml,tlong2/amphtml,jridgewell/amphtml,mhc-gh/amphtml,ampproject/amphtml,danielrozenberg/amphtml,media-net/amphtml,sharethrough/amphtml,adup-tech/amphtml,lannka/amphtml,src-code/amphtml,Gregable/amphtml,tlong2/amphtml,lannka/amphtml,erwinmombay/amphtml,mhc-gh/amphtml,honeybadgerdontcare/amphtml,dotandads/amphtml,yandex-pcode/amphtml,jridgewell/amphtml,alanorozco/amphtml,danielrozenberg/amphtml,media-net/amphtml,honeybadgerdontcare/amphtml,src-code/amphtml,zhouyx/amphtml