attach: Add the intermediate process to the cgroup

If requested that we join the cgroup on attach, do it with the
intermediate process as we won't have privileges over the attached
process itself.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>