The RemoteObjectFreer class is keeping the context alive even when the window is
closed. For electron applications that use sandbox, this will cause a memory
leak every time a new window is created with `window.open`.
Close#9191
Previously we rely on the v8util.setDestructor to dereference the remote
objects in JavaScript, however as documented in V8, it is forbidden to
call V8 APIs in object's destructor (e.g. the weak callback), and doing
so would result in crashs.
This commit removes the JavaScript setDestructor method, and avoids
doing the dereference work with V8.