Fixes #3861: Get the full group category entry to check its class

Also correct two reporting error and comments
Merge pull request #309 from fanf/bug_3861/ldap_error_when_deleting_category

Fixes #3861: Get the full group category entry to check its class
Merging 2.4 into 2.6