This NFC prepares the TimeProfiler to support the construction
and completion of time profiling 'entries' across threads.
(See https://reviews.llvm.org/D133083 for the full change).
- Add ClockType alias so we can change the clock in one place.
- (trivial) Use c++ usings instead of typedefs
- Rename Entry to TimeTraceProfilerEntry since this type will
eventually become public.
- Move construction of entries from TimeTraceProfiler::begin to
timeTraceProfilerBegin.
- Add an intro comment.
- Generalize from raw_pwrite_stream to raw_ostream to support
unit tests (and raw_pwrite_stream::pwrite was unused anyway).
- Add some smoke unit tests.