Fix 641 - Memory leak: JavascriptRootObjectWrapper is not released on Reload

Temporary fix for #641 until a better fix is found. See discussion on #641 for more detail.
I couldn't figure out how to make the compiler happy with th real type so I used object as a temporary fix.