fix memory leak when destroying entity
simplify System::notify_destroyed
update documentation