clean up vhosts and endpoints when container shuts down and starts up
Merge pull request #1015 from control-center/feature/CC-99

clean up vhosts and endpoints when container shuts down and starts up