Make stringification of enums, flags less repetitive
Use glib enumeration helpers to generate strings from enumeration values.
Prevents having to add new strings every time new enumerations are added or modified.
This completes https://phabricator.collabora.com/T17556
Edited by Simon McVittie