[[feature-enumvalueref]] libfoundation: Add enumerated type definition.

Add the ability to define enumerated types.  An enumerated type specifies a number of distinct permitted values.  An enumerated value is an immutable and represents one particular permitted value of an enumerated type.