Fix potential race condition in TimelineSvc
As far as I can tell, with the old code this is possible:
- Thread 1 call
emplace_back()and enterif(m_partial) - Thread 2 call
emplace_back() - Thread 1 call
m_events.back()which now yields the event created by thread 2.