add support for setresuid / setresgid

See also:
https://www.usenix.org/legacy/event/sec02/full_papers/chen/chen.pdf
whoops, set gid before uid