Reinstate test_integrate, make test_protocol more explicit, create testutil
Convert serveral tests to struct.pack
Convert more tests to struct.pack