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
Merge pull request #133 from bastih/master

A bunch of fixes and improvements