Reset scroll positions if the dom node has been detached and reattached.

Detaching a dom node will cause the scroll positions to reset to 0, causing the 'scroll' event to no longer fire when resizing. So - detect when the element is being added to the dom, and reset the scroll positions so that we can continue to detect resizes.