[common] adds threading abstraction
[common] changes profiler to keep both user+sys and walltime