restore: TASK_HELPERs live until SETUP_FDS stage

In order to use TASK_HELPERS to open files from dead processes, they should
persist until the fds are setup for each task. We add a new stage
CR_STATE_SETUP_FDS and have all tasks wait on that, and TASK_HELPERs exit
afterwards.

v2: don't live until end of restore stage, use new SETUP_FDS stage

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
remap: add remap_type field and use it

Maintain backwards compatibility for old images, but don't set the REMAP_GHOST
bit going forward, only use the remap_type field.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
remap: add a dead pid /proc remap

If a file like /proc/20/mountinfo is open, but 20 is a zombie (or doesn't exist
any more), we can't read this file at all, so a link remap won't work. Instead,
we add a new remap, called the dead process remap, which forks a TASK_HELPER as
that dead pid so that the restore task can open the new /proc/20/mountinfo
instead.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
test: add a test for remap_dead_pid

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>