* Add unit tests to demonstrate two unsafe bugs
* Fix bug in embedded pointer nil-check in encoder/decoder
Both encoder and decoder examine the wrong variable when checking for nil
embedded pointer in a struct.
* Fix wrong-size allocation of embedded pointer structs in decoder
When a nil embedded pointer is encountered in the decoder, it attempts to
allocate a fresh struct on the heap and assign its address into the embedded
pointer, so nested decoding can continue. However, it mistakenly allocates a
pointer-sized memory block, rather than struct-sized.