Update code and doctests to support the new version of the dns library.