Use fclose on opened files

Properly use fclose on opened files and stop eating up file descriptors.
Improve gtest bench

Use hardware counters in warmup runs, too.
Clean up PapiTracer