Allow configuration of uid/gid/detach on processes

This just copies the libuv implementation for libnative which seems reasonable
enough (uid/gid fail on windows).

Closes #12082