perf bpf: Generalize bpf__setup_stdout()