Profiling with a decorator and @njit

@stuartarchibald, would the line profiling in #5028 also provide function level profiling? Or would those be two different features?

@randompast the tree is a great addition! If I have time, I’ll try to add some information about the number of times a function is compiled (since excessive compilation can also be a performance problem). I think this decorator is a perfect example of the kind of things to put in the add-ons package (Addons / Contrib repo).