[WIP] Refactor profiling code

This is a prototype of a refactor for making the profiling more(at all) extensible. Basically everything is now in a profiler class that knows how to do it's profile, accumulate stats and dump them however we need to. An example of how this would be used is here Shopify/starscream#2235

@Shopify/data-engineers 
I guess we should change the argument name of `_add_profile` then.

It's current signature is: `def _add_profile(self, id, profileAcc):`