The test marshaler being used had different semantics - if a pointer was
passed it returned a pointer. Where as the gob marshaler we are running
removes references. This lead to ugliness in the code because we had to
test for both cases.

I changed the test marshaler to gob encode and decode items passed
to it so that it would match the semantics. The test marshler code
is a little repetitive but gets the job done which is the important
part. It allowed me to remove the ugliness where we had to check for
both pointer and non pointer types, even though in production we never
see a pointer type.