chg: dev: Use seteuid()/setegid() instead of setreseuid()/setresgid()
It looks like that all supported systems now have support for _POSIX_SAVED_IDS, so it's safe to use setegid() and setegid() because those will not change saved used/group IDs.
Closes #4862 (closed)