Added a notification mechanism for messages that were not delivered.
Added a bunch of useful lockless utilities.
Connect and disconnect events will busy wait for the queue to empty.