Code cleanups and error handling fixes to setting/dropping groups.
Code cleanups and error handling fixes to setting/dropping groups.

--HG--
branch : HEAD

dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot