vdl/vom: Add vom.RawBytes.VDLRead, and some bugfixes.

The idea behind vom.RawBytes.VDLRead is straightforward, but
there's a catch in the implementation; in order to work (easily),
we need to ensure that dec.StartValue hasn't been called.  I've
restructured the reflect_reader.go code to make this happen.

One bugfix is in vdl.Value.VDLRead.  It wasn't quite handling
type compatibility checks correctly, in both the nil and the
non-nil cases.  More importantly, I've added logic to allow
invalid values (where the type hasn't been set yet) to be read
and filled.  This is useful given the general reflect_reader.go
strategy of creating zero values and calling VDLRead.

Another bugfix is in TypeToReflect, to add handling for the
ErrorType case.  The basic idea is that if we're decoding from
error(nil) to any(nil), we should end up with any(error(nil)).
Adding the logic to TypeToReflect makes the existing convert.go
logic do the right thing, but it's hard to update the test to
reflect this.  Instead I've added typeToReflectFixed, which adds
the ErrorType case, and I've left TypeToReflect as-is.  We'll
flip over after we remove the existing convert logic.

Change-Id: I11b7db2ebbe2593c0da53156f70781bd4c963404
9 files changed