messenger: Tweak test client code

This code was sort of confusing to read.  Better now.
pxpcap: Allow injecting from bytearrays

Previously we could only inject bytes objects.  We can now handle
bytearrays (and maybe even other buffer types, sort of).