resolve: format zero-length RDATA according to rfc3597
If the RDATA is of zero length, the text representation contains only
the \# token and the single zero representing the length.
(cherry picked from commit 84f788d6699f289160d7cb3823c1bf9a3826f11f)