Moved most KryoNet code into MessageSystem, preparing to replace it.