trace: Add time and stack level to JSON output format
Add the timestamp and stack depth of the function call to the JSON trace output format. This information can be useful for cmake profiling and call stack inspection (see e.g. https://github.com/volo-zyko/cmake-profile-stats).
Relates to !4102 (merged) from @mensinda.
Edited by Frank Winklmeier