Useradd stability improvements

Useradd and explicit group dependencies did not work under certain circumstances, as explained in https://github.com/saltstack/salt/issues/1406
I moved the group adding out of the first call of useradd and made it a modification of the user after useradd has been called.
I also test whether the system has usergroups enabled and set the default group in useradd to avoid errors.