daemon: Refactor code to get ID from group name into a function
daemon: Refactor code to get ID from group name into a function

https://bugzilla.gnome.org/show_bug.cgi?id=688041

ritzk/gnome-online-accounts,ritzk/gnome-online-accounts,ritzk/gnome-online-accounts