Implement susped, resume and cancel for the Postinstall action.

This patch sends SIGSTOP/SIGCONT to the running postinstall program to
suspend/resume the child process, and SIGKILL when cancelling it.

Bug: 27272144
TEST=Added unittest to check the signal being sent.

(cherry picked from commit d15c546ed794293d0a63770467a0f3c4c84c6214)

Change-Id: Ie99b406b4d7f73dda4189b7a5a7d627c866055d6
diff --git a/common/test_utils.h b/common/test_utils.h
index 2c8a6de..60ec90e 100644
--- a/common/test_utils.h
+++ b/common/test_utils.h
@@ -90,6 +90,9 @@
   return chdir(path.c_str());
 }
 
+// Reads a symlink from disk. Returns empty string on failure.
+std::string Readlink(const std::string& path);
+
 // Checks if xattr is supported in the directory specified by
 // |dir_path| which must be writable. Returns true if the feature is
 // supported, false if not or if an error occurred.