fix bug in the caches created inside the LibpfmSensor (they were not refreshed correctly) + code refactoring of the tool sampling