Fix terminal unittest

Add check to function process_switchcontrolling
that the new terminal duped to stdio is really
the controlling terminal.
Remove PAM support from sysuser.c
Rename sysuser.c into syslogin.c

Added new sys type: sys_groupid_t