[RFC] Common: Add a buildin profiler

Would indenting the output to show an outline of nested profilers help visualise what is being measured?

For example:
Profiler 1  <time stats>
- Profiler 1.1  <time stats>
- Profiler 1.2  <time stats>
Profiler 2  <time stats>
- Profiler 2.1  <time stats>