crypto: fix KeyObject garbage collection
These objects don’t hold any resources on the event loop, so they should be weak objects that can be garbage collected when nothing refers to them anymore.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines