fix potential use-after-free with ares

Noticed this while digging into
https://github.com/facebook/libphenom/issues/29:

```
==26939== Invalid write of size 8
==26939==    at 0x10000AFD8: ph_job_set_nbio (in ./tests/dns.t)
==26939==    by 0x10000388B: sock_state_cb (in ./tests/dns.t)
==26939==    by 0xCD79: ares__close_sockets (in /usr/local/Cellar/c-ares/1.10.0/lib/libcares.2.dylib)
==26939==    by 0xD976: ares__destroy_servers_state (in /usr/local/Cellar/c-ares/1.10.0/lib/libcares.2.dylib)
==26939==    by 0xD871: ares_destroy (in /usr/local/Cellar/c-ares/1.10.0/lib/libcares.2.dylib)
==26939==    by 0x100003AC7: do_ares_fini (in ./tests/dns.t)
==26939==    by 0x100001C0F: ph_library_teardown (in ./tests/dns.t)
==26939==    by 0x2FC524: __cxa_finalize (in /usr/lib/system/libsystem_c.dylib)
==26939==    by 0x2FE68A: exit (in /usr/lib/system/libsystem_c.dylib)
==26939==    by 0x2667E7: start (in /usr/lib/system/libdyld.dylib)
==26939==  Address 0x100105950 is 16 bytes inside a block of size 120 free'd
/*
==26939==    at 0x75B8: free (in /usr/local/Cellar/valgrind/HEAD/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==26939==    by 0x100009DB7: ph_mem_free (in ./tests/dns.t)
==26939==    by 0x1000038A6: sock_state_cb (in ./tests/dns.t)
==26939==    by 0xCD79: ares__close_sockets (in /usr/local/Cellar/c-ares/1.10.0/lib/libcares.2.dylib)
==26939==    by 0xD976: ares__destroy_servers_state (in /usr/local/Cellar/c-ares/1.10.0/lib/libcares.2.dylib)
/*
==26939==    by 0xD871: ares_destroy (in /usr/local/Cellar/c-ares/1.10.0/lib/libcares.2.dylib)
==26939==    by 0x100003AC7: do_ares_fini (in ./tests/dns.t)
==26939==    by 0x100001C0F: ph_library_teardown (in ./tests/dns.t)
==26939==    by 0x2FC524: __cxa_finalize (in /usr/lib/system/libsystem_c.dylib)
==26939==    by 0x2FE68A: exit (in /usr/lib/system/libsystem_c.dylib)
==26939==    by 0x2667E7: start (in /usr/lib/system/libdyld.dylib)
```

I only saw it once, so seems hard to trigger, but nonetheless:
Switch to using a job template and SMR to address this.