Add event creation library and implement in scheduler.

> a lot of touching the should-be-private parts of the module 

I made this test be package record_test, which means the complier disallows that. ? Also coverage is 81%ish, which is essentially everything except for error conditions.