Implements priority time queue in trace tests

setTimeout/setInterval/Timer can be used in the trace tests now