Fix lxc-attach to work with unprivileged containers

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
utils: Drop trailing / in lxcpath

This fixes command line tools and functions which use
lxc_global_config_value o get lxcpath but don't strip the trailing /
leading to mismatching command path (as lxc_container_new does strip the
path).

As lxcpath is typically a const and so can't easily be changed by the
caller, add the trick directly into lxc_global_config_value (having to
juggle a bit in there too to avoid trying to alter a const).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
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>