leverage the StructType constructor code in set()
test: fix some jshint warnings
rename the backing buffer property to "ref.buffer"

The old prop name "buffer" was very likely to collide, as it's a common
struct property name in C. The new name "ref.buffer" is not a valid C struct
name, so it's very unlikely to every be a problem in the future.

/cc @tjfontaine