Introduced the Profiler system, to be able to do latency profiling

Not done yet, but roughly correct.
More profiling stuff

Actually using the Profiler.