bpf: task_group_seq_get_next: cleanup the usage of next_thread()