Implement Cookie/Reply more completely

also add some more tests and an implementation of python bytes -> char*