[libchromeos] support a pre-exec hook

Support a hook that is called after all other setup but right before exec() in
the child process; this can be used for things like doing additional sandboxing.

Also, clean up the argument-array code in Start(), which appeared to operate
under the assumption that the argument array given to execve(2) has to be
contiguous in RAM.

TEST=unit
BUG=chromium-os:30740

Change-Id: Iccdb34e7d43a4d29ae131a37acc5a2192d287579
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26925
Reviewed-by: Kees Cook <keescook@chromium.org>
4 files changed