samples, bpf: Refactor test_current_task_under_cgroup - separate out helpers