Dry up contexts related to destroying resources

* Extract duplicated code to new base class DestroyingAResource