Debug-only dynamic checks for layout and GC use of DOMRefCell

r? @mbrubeck, @jdm

Alternative to #3770 and #3716.