bugfix: CLOCK_THREAD_CPUTIME_ID is not monotonic crossing scheduling thr...

...eads

other issues in trace_service.c, fixed:
* trace_switch() reset current time without accumulating elapsed time
* trace_yield() accumulate elapsed time without resetting current time

test/testtrace.lua seems ok now.