src: trace_events: support for metadata events
Add support for metadata events. At this point they are added to the main buffer. Emit a metadata event for the main thread.
Metadata events are implicitly enabled when tracing is enabled. They contain information pertaining not to the individual events as they occur but rather about the process and the environment. Trace viewers use this information, e.g. to render thread names.
Example:
/cc @nodejs/trace-events @nodejs/diagnostics