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.
these need to be behind ifdefs too