Close previously returned immediately after marking the notifier
closed, so deliverLoop could still be invoking listener/DNS callbacks
after Close returned. Close now blocks on a completion channel that
deliverLoop closes once it has drained the queue and exited.