src: support WeakReference, diagnostics_channel and net in the snapshot
The first commit comes from 44192.
The support for net isn't complete, for example there is still work to be done to make the DNS code snapshotable. But it's already alright to snapshot sockets that have never fired DNS requests and are not actively open.
Refs: https://github.com/nodejs/node/issues/44014 Refs: https://github.com/nodejs/node/issues/37476