This is highly useful for profiling vanilla code, and in some cases plugin code. It is somewhat expensive, though, which is why it was initially disabled.
I chose to use a system property instead of a configuration setting because 1) the MethodProfiler is exclusive to CraftBukkit and not part of the general API (the timings system is the general API equivalent), and 2) using a static final boolean property _may_ allow the JITter to optimize out the methods when disabled (though I'm not sure of it).
There are several changes to fix cases where the profiler code was broken slightly by other craftbukkit changes. All of cases have been fixed, except for the block entity ticking one, due to the cost of the getSimpleName call. For that, a ticking entry is used instead, so that time spent actually ticking the block entities can be compared with time processing the list.
This (effectively) reverts 7dde6cc566.
Glitch is caused because entities drop their leads when they are dead and still leashed and when they can't find their owner (Or the distance is too large).
We need to make sure the entity we set to be dead, loses its leash before the next tick, else there will be two dropped leads.