reworked group functionality to work with new idnumber mechanism
added setting to control group removal behaviour
check plugin configuration before cleaning up groups