1/ handle removing of queued events in events_cleanup
2/ drop events when uninstalling module/block
3/ remove schedule column from events_queue table, one event may be processed by instant and cron handler at the same time
4/ add debug warning into queue_handler() when event id already queued in by queue handler
5/ name variables consistantly - $handler...events_handlers; $qhandler...events_queue_handlers; $event, etc...
6/ mark internal function as "INTERNAL do not use outside of eventslibs.php"
7/ more consistent naming of internal events_xxxx functions
8/ implement status checks for instant handlers
9/ improve inline comments
10/ add new event_pending_status($eventname) thak returns number of queued events for given queue
11/ make the code more fault tolerant + add debugging messages indication coding problems
12/ dequeue broken data (database inconsistencies) - but keep the events in queue if handler function fails or does not exist
13/ UNIT TESTS