Add task profiler, which works by instrumenting each task runtime when enabled.

@pcwalton - I'm not sure if there's any gotchas or downsides to profiling using this technique to instrument the runtime. Happy to close this if it doesn't seem like a good idea to you. r?

Yep that's fine - I'm hoping we can use some of this functionality to get some detailed numbers on the current threading model, which may help in discussions around future threading models (like the job queue we've briefly discussed).