Handle serialization of SERVER_NEGOTIATE packet in an object.

Moving marshalling and unmarshalling of packets into an object makes
dealing with packets less error-prone.