Allow entering a user namespace with a default mapping.

Map the current uid as root inside the namespace. This is useful
to run Minijail as a non-root user.

Also refactor uid/gid map functions to remove duplicate code.

Bug: 30691131

Change-Id: Ideef616c8c13bcbacb14b826fa2fc064701a6f69
2 files changed