Allow copying the enumeration values when registering types

The existing API for registering enumeration types requires that the
GEnumValue and GFlagsValue arrays that describe the enumeration values
is located in static storage. This causes unnecessary relocations, and
does not save that much memory, compared to the rest of GType.

We can provide a new API, to be used by developers, to copy the
enumeration values, and thus drop the ones they have from static
storage.
2 files changed