Fixes #5255 - Version destroy plan takes 20+ minutes

Removing before_destroy hook and creating a dynflow action to handle updating
ElasticSearch. Also removed package orphan code from clear_packages_index.