Serialization takes place by actual object type

Previously, serialization happened according to the properties's
declared type. This created problems for cases where the actual value
type differed from the declared type (polymorphism, ints boxed as
objects...).

Closes #26, #14
Added YamlMember attribute with SerializeAs

- Allows manual control of the type used when serializing
- Added unit tests
- Related to #26
- NOTE: Although serialization works great, the two unit tests currently
  fail because of round-tripping issues related to the new polymorphism