Fix cgroups background
Created by: derkling
This should fix an issue related to the background execution of tasks which are also moved into a CGroup. We slightly update also the semantics of the run() call which allows to collect an ftrace for a background task by using the recently added end_pause_s parameter to specify for how long a trace must be collected while the task runs in background.