Fixed object destroy function of CoralVM-C
Added the expected behavior of weak references to CoralVM-C