Title: #564: Do not keep allocating external groups on a long-lived context
The hash table with the external groups was never freed, so the
server_mode->ext_groups context was growing over time.
This patch keeps the new hash on the state if something failed, then frees
the previous hash and finally steals the new hash onto the server mode.
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/564/head:pr564
git checkout pr564