Add adoptedCallback to work around Firefox Native CE bug (#34455)
Add adoptedCallback to work around Firefox Native CE bug (#34455)

See https://output.jsbin.com/yuwojok/29/quiet for a working demo of the bug. When we construct a CustomElement in one document, then insert it into another document (as we do with A4A ads), Firefox incorrectly resets the prototype of our CE instance to `HTMLElement.prototype`.

Luckily, we can fix this by listening for the `adoptedCallback`, which fires just after Firefox resets the prototype. If we detect a broken prototype chain, we can correct it before any other code can notice. See https://output.jsbin.com/datajos/5/quiet for a demo of the fix.
ampproject/amphtml,ampproject/amphtml,jridgewell/amphtml,honeybadgerdontcare/amphtml,media-net/amphtml,mhc-gh/amphtml,honeybadgerdontcare/amphtml,jridgewell/amphtml,smartadserver/amphtml,mhc-gh/amphtml,smartadserver/amphtml,ampproject/amphtml,smartadserver/amphtml,rsimha-amp/amphtml,jpettitt/amphtml,danielrozenberg/amphtml,mhc-gh/amphtml,jpettitt/amphtml,jridgewell/amphtml,alanorozco/amphtml,rsimha-amp/amphtml,smartadserver/amphtml,Gregable/amphtml,ampproject/amphtml,mhc-gh/amphtml,honeybadgerdontcare/amphtml,Gregable/amphtml,media-net/amphtml,alanorozco/amphtml,media-net/amphtml,jridgewell/amphtml,mhc-gh/amphtml,jridgewell/amphtml,mhc-gh/amphtml,honeybadgerdontcare/amphtml,jpettitt/amphtml,jpettitt/amphtml,honeybadgerdontcare/amphtml,rsimha-amp/amphtml,smartadserver/amphtml,rsimha-amp/amphtml,alanorozco/amphtml,Gregable/amphtml,jpettitt/amphtml,alanorozco/amphtml,media-net/amphtml,alanorozco/amphtml,danielrozenberg/amphtml,mhc-gh/amphtml,danielrozenberg/amphtml,honeybadgerdontcare/amphtml,alanorozco/amphtml,rsimha-amp/amphtml,danielrozenberg/amphtml,Gregable/amphtml,jpettitt/amphtml,Gregable/amphtml,danielrozenberg/amphtml,Gregable/amphtml,honeybadgerdontcare/amphtml,media-net/amphtml,danielrozenberg/amphtml,danielrozenberg/amphtml,ampproject/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,Gregable/amphtml,smartadserver/amphtml,alanorozco/amphtml,ampproject/amphtml,jridgewell/amphtml,media-net/amphtml,Gregable/amphtml,ampproject/amphtml,media-net/amphtml,jridgewell/amphtml,rsimha-amp/amphtml,mhc-gh/amphtml,ampproject/amphtml,media-net/amphtml,rsimha-amp/amphtml,jpettitt/amphtml,jpettitt/amphtml