trivial: refactor the gcm-prefs.c code to include a class instance struct to make porting to cc-shell easier