service: service should compile on Ubuntu 14.04

I'm not quite sure what the difference is (I have gcc 4.8, but there are
probably also header differences), but when I compile the service on 14.04 I
get:

  CC       cr-service.o
cr-service.c: In function ‘start_page_server_req’:
cr-service.c:536:8: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
   write(start_pipe[1], &ret, sizeof(ret));
        ^
cr-service.c:544:6: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]
  read(start_pipe[0], &ret, sizeof(ret));
      ^

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
restore: TASK_HELPERs live through restore stage

In order to use TASK_HELPERS to open files from dead processes, they should
persist through the end of the restore phase, since that is when the fds are
set up.

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 remapping dead pids

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