perf env: Move perf_env out of header.h and session.c into separate object