Check cycles before propagating events.
Merge pull request #141 from tsherif/event-cycles

Check cycles before propagating events. Closes #140.
Added utilities to prevent memory leaks in event propagation.
Merge pull request #143 from tsherif/event-cleanup

Added utilities to prevent memory leaks in event propagation. Closes #139.