Make library_events.js part of built-in linked JS libraries. Add browser test.
Use the C defines mechanism for events.h #defines.
Use the C_STRUCTS machinery to compute offsets to structs in events.h.