REFACTOR: harden api arg checking
Add test for shutting down to mprCreateEventOutside