Fix traces (re)generation
Created by: derkling
Here is a refracting of the trace generation function which should:
- make the code a little bit more clear using a common naming schema for trace locals
- introduce support for text traces re-generation once the corresponding binary trace has been updated
The last feature is especially useful when we run multiple time a test which keep updating the same binary trace file.
The new proposal should diverge from original code just regarding "raw" traces generation, more details in the commit message for the second patch.