inspector: Fix the inspector connection cleanup
Checklist
-
make -j4 test
(UNIX) orvcbuild test nosign
(Windows) passes -
a test and/or benchmark is included -
the commit message follows commit guidelines
Affected core subsystem(s)
This change only touches inspector connection
Description of change
In some cases close callback was called twice while other codepaths ended up not releasing the memory at all.
CC: @ofrobots