Add IPC notifications for tracking and profiling

fwiw, I don't have a hard-and fast rule about this. I think often code is being read top-down, so function order of caller ... then callee makes sense, which js has good support for. There are cases, like when completely standalone functions such as debug loggers, or other utility functions, or sometimes basic math when you are building up to a more-complex function, when define before use is more readable. I don't think a one-size fits all rule is useful. But in other cases, seeing a piece of code when you have no idea what its for is not readable. I think this case is more like that. I see `function wrapCallback` and it means nothing, I can't read its body because I have no idea what its called from, which I think is common with callbacks in particular, the meaning of their bodies is closely coupled to the surrounding code (which in other places would be a poorly defined function, but not for callbacks). So I skip the function def, read where its called from, then skip back to the function body... so I'd prefer that the code be ordered into the reasonable reading order... which is the call sequence. But I'm not insisting, I can read it either way, its just a bit more jumping around in the current order, and since it all fits across a dozen lines, its not hard for the eyes to move around.