shmem: implement manual anon shared memory dedup
shmem: implement manual anon shared memory dedup

We use the same dumping and restoring mechanism for anon private and
anon shared memory. Because of this we can implement manual deduplication
of shared anon memory the same way we do it with private anonymous memory.
Also we need to rename pid parameter of cr_dedup_one_pagemap to id because
now we can pass either pid or shmid there and the actual meaning depends
on flags: PR_TASK is for pid, PR_SHMEM is for shmid.

Signed-off-by: Fyodor Bocharov <96a925d417742fc615ddc00e8c4c9fcdc5aaa11b@gmail.com>
Signed-off-by: Eugene Batalov <7a4372f440491fdba11e6e9c63b691b267a65e67@gmail.com>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@virtuozzo.com>

eabatalov/criu,eabatalov/criu,eabatalov/criu,eabatalov/criu,eabatalov/criu,eabatalov/criu