image: check if image owner == root and perms == CR_FD_PERM

Currently, criu accepts any images. Lets check if owner == root and
perms == CR_FD_PERM to ensure that image wasn't modified by unprivileged
user. If it isn't so, print warning and check who is currently using criu.
If user != root, don't allow to use this image and return error. Root, in
his turn, can use any images.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
security: allow to dump/restore if crid == rid

Currently non-root user can't dump/restore process if his id doesn't match
all rid, eid and sid at the same time. Since unprivileged user can't gain
process rights by restoring modified images, we can allow to dump/restore
processes if user_id == process_rid.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>