dns/dnsmessage: allocation free DNS message parsing and building

Parsing and building can now be done 100% allocation free for most
types. Non-name variable-length fields such as TXT records still
require allocations. Building with compression still causes allocations
due to the use of a map. Both parsing and building will perform
allocations in error paths.

Updates golang/go#16218

Change-Id: I644a7776bd0bf4ad20def521cee44eeadc5e9c06
Reviewed-on: https://go-review.googlesource.com/41145
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed