Add ability to query threads that are not associated with any group_id

@antoviaque just noticed this comment. FYI, I don't think nil is a possible value for the group_id attribute. Only the existence is checked in the code of the service.