Add tests and code for packetbuffers, packets, and messages.