Initial tracing API (initially does memory profiling and analysis)

This is used in conjunction with a collection & analysis server
to analyze memory usage and other aspects of a program running
under emscripten.
I do, so long as I have the time. It isn't as simple as it seems as a couple of things have to be reorganized.