Fixes #5255 - Version destroy plan phase takes 20+ min

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