Add support for reading values from refdata
This is the easiest way to support tests in child changes for
serialization. Some alternative approach may be possible in the future,
when the serialization approach matures, but I seem to recall there have
been requests for this functionality also in other contexts. There is
some less-than-ideal behavior (in particular, a newly created test fails
if it uses this functionality, and only succeeds when you actually
create the reference data).
Also add support for a separate type of unsigned char reference values,
to support serialization tests.
Change-Id: I35ee9d43a0737a342f756cda0e7a789273ce1d9e