[RFC] Common: Add a buildin profiler

It should be the sum of all. But this implemention has some race conditions atm. I think it possible to solve them with thread local storage, but I'm not sure if this overhead is worth.
Usually such a framework is used when you know what you are going to profile - or at least the one who asked you to use a build to profile :D