dns: support dns module in the snapshot
For the initial iteration, only the default resolver can be serialized/deserialized. If dns.setServers()
has been called, we'll preserve the configured DNS servers in the snapshot. We can consider exposing the serialization method if it becomes necessary for user-land snapshots.