reorganize a bit; work on c-ares-based name resolver