Extended Dexie.events() to handle 'asap' events

When implementing Dexie.Observable and Dexie.Syncable, I found myself in
need of events that execute in its own stack (using setTimeout() /
setImmediate()), so I provided a way to configure such events in
Dexie.events().
Code review and corrections