This is a rewrite of almost everything. The provided modules no longer
rely on undocumented/deprecated behavior.
It's no longer possible to have multiple DNS "servers" on different
sockets, but the new version allows serving arbitrary records. Records
can be defined in the config or Caddyfile.
The provider communicates with the Server via a channel.
dns.HandleFunc(".", handler) modifies the global dns.DefaultServeMux and
dns.Server uses that if it is initialized without a Handler. This would
cause issues when multiple instances of the module try to Present() at
the same time.
This also moves the domain check before the type check.
Domains need to be compared case-insensitively because resolvers will
send sarcastic queries for improved security, see here:
https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00
strings.EqualFold is maybe not perfectly correct because it does Unicode
case-folding and we only need ASCII.