Added before and after delete events

Added a hopefully more usefull event right before an entity is being
deleted.