OTRS/otrs — pull request #194 by moritz (2014-06-26 08:55:41+00:00)
Title: Handle events before destroying objects

Register event handlers with the object manager, and fire the events
from within DiscardObjects before discarding any objects.

This mitigates problems where event handlers fired in global destruction,
after the object manager already had been garbage-collected