Redo the struct-packing code in a slightly lower-level way

This change allows the struct-packing to set both the data and
the arrmeta in the struct being packed, so that references to
arrays can be tracked properly in the arrmeta.

This also removes the use of named lookups for packing the values,
setting those values in more direct efficient ways for simple cases.
Add support for std::vector to the struct packing
Merge pull request #164 from mwiebe/struct_pack

Struct packing refactor