Fixes #5255 - Version destroy plan phase clears packages

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