rename type to group; this is used for db in turntable and plugin in telemetry
add getGroups function to pull the list for the groups drop down from Telegraph.queries