daemon: build: allow the USER directive to modify the owner of COPY'd files

This patch ensures that the USER directive will change the owner of any
COPY'd files or directories to the user id and primary group id of the
user which the builder's run config currently runs as. The user and
primary groups ids are ascertained using the same process and package as
libcontainer to ensure consistency (the same defaults are also used).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
integration-cli: add tests for USER changing owner of COPY'd files

This patch adds integration-cli tests for a wide variety of USER
directives to ensure that they all act consistently with the RUN
directive in terms of the owner of COPY'd files.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)