Add support for "polymorphic" types to YAMLIO.
PolymorphicTraits can dynamically switch between other traits (Scalar, Map, or Sequence). When inputting, the PolymorphicTraits type is told which type to become, and when outputting the PolymorphicTraits type is asked which type it currently is.
Also adds support for TaggedScalarTraits to allow dynamically differentiating between multiple scalar types using YAML tags.
Some other minor changes, like serializing empty maps as "{}" and empty sequences as "[]", so that types are preserved when round-tripping PolymorphicTraits.
This patch is part of a series required for AMDGPU to support it's new MessagePack metadata.