Remove redundant `g_hash_table_remove_all()` calls
Fix leak of FFI objects when script is unloaded before GC