When serializing a RR of type PTR, we should use the DNS name serialization format, not a raw string.
While at it, refactor it slightly.
This is a wrapper around a string representing a domain name (such as "example.com"). It never has a trailing dot. For now, this class doesn't do much except wrap the raw string. Subsequent commits will add or move more functionality to it.