Use the reentrant timer methods from
https://reviews.llvm.org/D36847 instead of manually keeping track of the
number of times startTimer() and stopTimer() should be called.
Test plan:
Run clang -ftime-report and confirm the time measurements are roughly
the same before and after applying this patch.