[RFC] Common: Add a buildin profiler

This would be very cool, but I have no clue how to implement this cleanly. As this would require the storage up to the power of two of the profilers, a good memory management would be nice. And ignoring wrong stats on race conditions would bring us to hell then ...