Implement reading and writing the DNS packet
This introduces a stream class that handles reading and writing as well as big endian conversion of the required types. The writing parts that were already there have been completely rewritten.