Assorted DNS tests (for real this time)

There are no permissions tests in this branch because I don't know how to do them and because this branch has taken long enough to prepare already.