Finalise "/gate setconf" command

Replace original string types with custom enumeration types and add
additional error checking to the reading/writing on json files.