zdtm: Introduce per-test hooks

This is inspired by two problems we have with cgroup* tests.

1. Tests cannot easily clean after themselves -- one cannot
   remove a cg dir with tasks in it and the root task of
   a test is in a cgroup it tries to remove.

2. After dump old cgroup dirs are remained after the test,
   while criu should restore them (this is what we write
   tests for).

The proposal is to introduce per-test hooks, for now two of
them: --pre-restore and --clean. For cgroup tests both hooks
will remove the created directories.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cg: Strip trailing \n from property's value

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cg: Check for name= prefix in controller, not cgset

This should be symmetrical with cg dirs creation.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
cg: A helper for getting controller's yard dir name (and opts)

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
cg: Get yard fd on demand

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cg: Don't copy path when restoring properties

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>