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'd rather not add a trace-specific variable here, let's call this `default_opts`