vdl: Implement vdl.Read, the reflect-based version of VDLRead.

As with vom.xDecoder, there aren't tests yet for this logic.
However the logic is much simpler than the original convert.go
logic, and it's possible to read the code and reason about why
certain branches are taken, and how cases are handled.  I'll add
comprehensive tests using a new vdltest package in a future CL.

I have tested manually, and have hacked the benchmarks to run
using the new vom.XDecoder, but without any code-generated
VDLRead methods.  The numbers are just for reference; right now
the goal is to get everything implemented correctly, and we can
optimize later.

Here's the results of those benchmarks.  In all cases the
reflect-based vdl.Read is "new", while we compare against various
different "old" states.

* Compare against "old" code-generated Target interface.
* It's surprising that the numbers are comparable, since the
* "new" code uses reflection, not code-generation.
*
* I don't know why the 1000Customer case is so much slower.
[old=Target new=reflect]  old ns/op   new ns/op    delta
VomDecodeRequest             10782        9186    -14.80%
VomDecodeResponse             2038        2047     +0.44%
VomDecodeCustomer             5927        5960     +0.56%
VomDecoder1Customer         197267      204620     +3.73%
VomDecoder1000Customer     4815771     8141702    +69.06%

* Compare against "old" code-generated VDLRead methods.  We
* expect the new code to be slower, since it uses reflection.
*
* I don't know why the DecodeCustomer and Decoder1Customer cases
* are so close.
[old=codegen new=reflect] old ns/op   new ns/op    delta
VomDecodeRequest              2711        9186   +238.84%
VomDecodeResponse              948        2047   +115.93%
VomDecodeCustomer             5967        5960     -0.12%
VomDecoder1Customer         197229      204620     +3.75%
VomDecoder1000Customer     3031866     8141702   +168.54%

* Compare against "old" protobuf code-generated methods.  We
* expect the new code to be slower, since it uses reflection.
[old=proto new=reflect]   old ns/op   new ns/op    delta
DecodeRequest                 1890        9186   +386.03%
DecodeResponse                1081        2047    +89.36%

* Compare against "old" reflection-based gob.  We want the new
* code to be comparable, but it's currently much slower.
[old=gob new=reflect]     old ns/op   new ns/op    delta
Decoder1Customer             58117      204620   +252.08%
Decoder1000Customer        2734031     8141702   +197.79%

Change-Id: Ic0291f0af51327937e68ff927d6bafe9b27e8ffe
7 files changed